diff --git a/.coveralls.yml b/.coveralls.yml deleted file mode 100644 index ad1e93c375b..00000000000 --- a/.coveralls.yml +++ /dev/null @@ -1 +0,0 @@ -repo_token: GZFmqKPy7XEX0uOl9TDZFUoOQ5AHADMkU diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 00000000000..e44ff16bcab --- /dev/null +++ b/.eslintignore @@ -0,0 +1,3 @@ +docs +lib +test/disabled diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index 2137437304a..00000000000 --- a/.eslintrc +++ /dev/null @@ -1,32 +0,0 @@ -{ - "extends": [ - "eslint:recommended" - ], - "env": { - "node": true, - "mocha": true, - "es6": true - }, - "globals": { - "Promise": true, - "Set": true, - "Symbol": true - }, - "parserOptions": { - "ecmaVersion": 2017 - }, - "plugins": [ - "prettier" - ], - "rules": { - "prettier/prettier": ["error", { - "singleQuote": true, - "tabWidth": 2, - "printWidth": 100 - }], - - "no-console": 0, - "eqeqeq": ["error", "always", {"null": "ignore"}], - "strict": ["error", "global"] - } -} diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 00000000000..bda3d7eae39 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,49 @@ +{ + "root": true, + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaVersion": 2018 + }, + "plugins": [ + "@typescript-eslint", + "prettier", + "promise", + "eslint-plugin-tsdoc" + ], + "extends": [ + "eslint:recommended", + "plugin:@typescript-eslint/eslint-recommended", + "plugin:@typescript-eslint/recommended", + "prettier/@typescript-eslint", + "plugin:prettier/recommended" + ], + "env": { + "node": true, + "mocha": true, + "es6": true + }, + "rules": { + "prettier/prettier": "error", + + "tsdoc/syntax": "warn", + + "no-console": "off", + "eqeqeq": ["error", "always", { "null": "ignore" }], + "strict": ["error", "global"], + "promise/no-native": "error", + + "@typescript-eslint/no-explicit-any": "off" + }, + "overrides": [{ + "files": ["*.d.ts"], + "rules": { + "prettier/prettier": "off", + "@typescript-eslint/no-empty-interface": "off" + } + }, + { + "files": ["*.mjs"], + "parserOptions": {"sourceType": "module"} + + }] +} diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 1de7efde03a..4d203390a03 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -11,7 +11,7 @@ functions: - command: git.get_project params: directory: src - - command: git.apply_patch + shallow_clone: true - command: shell.exec params: working_dir: src @@ -24,11 +24,20 @@ functions: fi export DRIVERS_TOOLS="$(pwd)/../drivers-tools" + export PROJECT_DIRECTORY="$(pwd)" export MONGO_ORCHESTRATION_HOME="$DRIVERS_TOOLS/.evergreen/orchestration" export MONGODB_BINARIES="$DRIVERS_TOOLS/mongodb/bin" export UPLOAD_BUCKET="${project}" + # fix paths on windows + if [ "Windows_NT" = "$OS" ]; then + export DRIVERS_TOOLS=$(cygpath -m -a $DRIVERS_TOOLS) + export MONGO_ORCHESTRATION_HOME=$(cygpath -m -a $MONGO_ORCHESTRATION_HOME) + export MONGODB_BINARIES=$(cygpath -m -a $MONGODB_BINARIES) + export PROJECT_DIRECTORY=$(cygpath -m -a $PROJECT_DIRECTORY) + fi + cat < expansion.yml CURRENT_VERSION: "$CURRENT_VERSION" DRIVERS_TOOLS: "$DRIVERS_TOOLS" @@ -60,14 +69,7 @@ functions: script: > ${PREPARE_SHELL} - rm -rf $DRIVERS_TOOLS - - if [ "${project}" = "drivers-tools" ]; then - # If this was a patch build, doing a fresh clone would not actually test the patch - cp -R ${PROJECT_DIRECTORY}/ $DRIVERS_TOOLS - else - git clone git://github.com/mongodb-labs/drivers-evergreen-tools.git $DRIVERS_TOOLS - fi + git clone --depth 1 git://github.com/mongodb-labs/drivers-evergreen-tools.git $DRIVERS_TOOLS echo "{ \"releases\": { \"default\": \"$MONGODB_BINARIES\" }}" > $MONGO_ORCHESTRATION_HOME/orchestration.config @@ -76,10 +78,25 @@ functions: params: script: | ${PREPARE_SHELL} - MONGODB_VERSION=${VERSION} TOPOLOGY=${TOPOLOGY} bash ${DRIVERS_TOOLS}/.evergreen/run-orchestration.sh + MONGODB_VERSION=${VERSION} TOPOLOGY=${TOPOLOGY} \ + AUTH=${AUTH} SSL=${SSL} \ + ORCHESTRATION_FILE=${ORCHESTRATION_FILE} \ + bash ${DRIVERS_TOOLS}/.evergreen/run-orchestration.sh - command: expansions.update params: file: mo-expansion.yml + bootstrap mongohoused: + - command: shell.exec + params: + script: | + ${PREPARE_SHELL} + DRIVERS_TOOLS="${DRIVERS_TOOLS}" bash ${DRIVERS_TOOLS}/.evergreen/atlas_data_lake/build-mongohouse-local.sh + - command: shell.exec + params: + background: true + script: | + ${PREPARE_SHELL} + DRIVERS_TOOLS="${DRIVERS_TOOLS}" bash ${DRIVERS_TOOLS}/.evergreen/atlas_data_lake/run-mongohouse-local.sh run tests: - command: shell.exec type: test @@ -98,10 +115,10 @@ functions: type: test params: working_dir: src - script: > + timeout_secs: 60 + script: | ${PREPARE_SHELL} - if [ -n "${CLIENT_ENCRYPTION}" ]; then # Disable xtrace (just in case it was accidentally set). set +x @@ -109,26 +126,57 @@ functions: rm -f ./prepare_client_encryption.sh fi - - AUTH=${AUTH} SSL=${SSL} UNIFIED=${UNIFIED} MONGODB_URI="${MONGODB_URI}" bash - ${PROJECT_DIRECTORY}/.evergreen/run-tests.sh + AUTH=${AUTH} SSL=${SSL} UNIFIED=${UNIFIED} MONGODB_URI="${MONGODB_URI}" \ + NODE_VERSION=${NODE_VERSION} SKIP_DEPS=1 NO_EXIT=1 \ + bash ${PROJECT_DIRECTORY}/.evergreen/run-tests.sh + run checks: + - command: shell.exec + type: test + params: + working_dir: src + script: | + ${PREPARE_SHELL} + bash ${PROJECT_DIRECTORY}/.evergreen/run-checks.sh + run mongosh integration tests: + - command: shell.exec + type: test + params: + working_dir: src + script: | + ${PREPARE_SHELL} + bash ${PROJECT_DIRECTORY}/.evergreen/run-mongosh-integration-tests.sh cleanup: - command: shell.exec params: + silent: true script: | ${PREPARE_SHELL} rm -rf $DRIVERS_TOOLS || true fix absolute paths: - command: shell.exec params: + silent: true script: | ${PREPARE_SHELL} for filename in $(find ${DRIVERS_TOOLS} -name \*.json); do perl -p -i -e "s|ABSOLUTE_PATH_REPLACEMENT_TOKEN|${DRIVERS_TOOLS}|g" $filename done + windows fix: + - command: shell.exec + params: + silent: true + script: | + ${PREPARE_SHELL} + # for i in $(find ${DRIVERS_TOOLS}/.evergreen ${PROJECT_DIRECTORY}/.evergreen -name \*.sh); do + # cat $i | tr -d '\r' > $i.new + # mv $i.new $i + # done + # Copy client certificate because symlinks do not work on Windows. + cp ${DRIVERS_TOOLS}/.evergreen/x509gen/client.pem ${MONGO_ORCHESTRATION_HOME}/lib/client.pem make files executable: - command: shell.exec params: + silent: true script: | ${PREPARE_SHELL} for i in $(find ${DRIVERS_TOOLS}/.evergreen ${PROJECT_DIRECTORY}/.evergreen -name \*.sh); do @@ -141,26 +189,295 @@ functions: working_dir: src script: | ${PREPARE_SHELL} - NODE_LTS_NAME=${NODE_LTS_NAME} bash ${PROJECT_DIRECTORY}/.evergreen/install-dependencies.sh + NODE_LTS_NAME=${NODE_LTS_NAME} MSVS_VERSION=${MSVS_VERSION} \ + bash ${PROJECT_DIRECTORY}/.evergreen/install-dependencies.sh + - command: expansions.update + params: + file: src/deps-expansion.yml run atlas tests: + - command: shell.exec + type: test + params: + silent: true + working_dir: src + script: | + cat < prepare_atlas_connectivity.sh + export ATLAS_CONNECTIVITY='${ATLAS_CONNECTIVITY}' + EOT + - command: shell.exec + type: test + params: + working_dir: src + script: | + # Disable xtrace (just in case it was accidentally set). + set +x + . ./prepare_atlas_connectivity.sh + rm -f ./prepare_atlas_connectivity.sh + + NODE_LTS_NAME='${NODE_LTS_NAME}' bash ${PROJECT_DIRECTORY}/.evergreen/run-atlas-tests.sh + run kerberos tests: + - command: shell.exec + type: test + params: + working_dir: src + script: | + KRB5_KEYTAB='${gssapi_auth_keytab_base64}' KRB5_PRINCIPAL='${gssapi_auth_principal}' \ + MONGODB_URI='${gssapi_auth_mongodb_uri}' \ + NODE_LTS_NAME='${NODE_LTS_NAME}' bash ${PROJECT_DIRECTORY}/.evergreen/run-kerberos-tests.sh + run ldap tests: + - command: shell.exec + type: test + params: + working_dir: src + script: | + MONGODB_URI='${plain_auth_mongodb_uri}' NODE_LTS_NAME='${NODE_LTS_NAME}' \ + bash ${PROJECT_DIRECTORY}/.evergreen/run-ldap-tests.sh + run data lake tests: + - command: shell.exec + type: test + params: + working_dir: src + script: | + MONGODB_URI='mongodb://mhuser:pencil@localhost' NODE_LTS_NAME='${NODE_LTS_NAME}' \ + bash ${PROJECT_DIRECTORY}/.evergreen/run-data-lake-tests.sh + run tls tests: + - command: shell.exec + type: test + params: + working_dir: src + script: | + NODE_LTS_NAME=${NODE_LTS_NAME} DRIVERS_TOOLS="${DRIVERS_TOOLS}" \ + SSL_CA_FILE="${SSL_CA_FILE}" SSL_KEY_FILE="${SSL_KEY_FILE}" \ + MONGODB_URI="${MONGODB_URI}" bash ${PROJECT_DIRECTORY}/.evergreen/run-tls-tests.sh + add aws auth variables to file: - command: shell.exec type: test params: working_dir: src silent: true - script: > - # DO NOT ECHO WITH XTRACE (which PREPARE_SHELL does) + script: | + cat < ${DRIVERS_TOOLS}/.evergreen/auth_aws/aws_e2e_setup.json + { + "iam_auth_ecs_account" : "${iam_auth_ecs_account}", + "iam_auth_ecs_secret_access_key" : "${iam_auth_ecs_secret_access_key}", + "iam_auth_ecs_account_arn": "arn:aws:iam::557821124784:user/authtest_fargate_user", + "iam_auth_ecs_cluster": "${iam_auth_ecs_cluster}", + "iam_auth_ecs_task_definition": "${iam_auth_ecs_task_definition}", + "iam_auth_ecs_subnet_a": "${iam_auth_ecs_subnet_a}", + "iam_auth_ecs_subnet_b": "${iam_auth_ecs_subnet_b}", + "iam_auth_ecs_security_group": "${iam_auth_ecs_security_group}", + "iam_auth_assume_aws_account" : "${iam_auth_assume_aws_account}", + "iam_auth_assume_aws_secret_access_key" : "${iam_auth_assume_aws_secret_access_key}", + "iam_auth_assume_role_name" : "${iam_auth_assume_role_name}", + "iam_auth_ec2_instance_account" : "${iam_auth_ec2_instance_account}", + "iam_auth_ec2_instance_secret_access_key" : "${iam_auth_ec2_instance_secret_access_key}", + "iam_auth_ec2_instance_profile" : "${iam_auth_ec2_instance_profile}" + } + EOF + run aws auth test with regular aws credentials: + - command: shell.exec + type: test + params: + working_dir: src + script: | + ${PREPARE_SHELL} + cd ${DRIVERS_TOOLS}/.evergreen/auth_aws + ${MONGODB_BINARIES}/mongo aws_e2e_regular_aws.js + - command: shell.exec + type: test + params: + working_dir: src + silent: true + script: | + cat <<'EOF' > "${PROJECT_DIRECTORY}/prepare_mongodb_aws.sh" + alias urlencode='python -c "import sys, urllib as ul; print ul.quote_plus(sys.argv[1])"' + USER=$(urlencode ${iam_auth_ecs_account}) + PASS=$(urlencode ${iam_auth_ecs_secret_access_key}) + export MONGODB_URI="mongodb://$USER:$PASS@localhost:27017/aws?authMechanism=MONGODB-AWS" + EOF + - command: shell.exec + type: test + params: + working_dir: src + script: | + ${PREPARE_SHELL} + ${PROJECT_DIRECTORY}/.evergreen/run-mongodb-aws-test.sh + run aws auth test with assume role credentials: + - command: shell.exec + type: test + params: + working_dir: src + script: | + ${PREPARE_SHELL} + cd ${DRIVERS_TOOLS}/.evergreen/auth_aws + ${MONGODB_BINARIES}/mongo aws_e2e_assume_role.js + - command: shell.exec + type: test + params: + working_dir: src + silent: true + script: | + cat <<'EOF' > "${PROJECT_DIRECTORY}/prepare_mongodb_aws.sh" + alias urlencode='python -c "import sys, urllib as ul; print ul.quote_plus(sys.argv[1])"' + USER=$(jq -r '.AccessKeyId' ${DRIVERS_TOOLS}/.evergreen/auth_aws/creds.json) + USER=$(urlencode $USER) + PASS=$(jq -r '.SecretAccessKey' ${DRIVERS_TOOLS}/.evergreen/auth_aws/creds.json) + PASS=$(urlencode $PASS) + SESSION_TOKEN=$(jq -r '.SessionToken' ${DRIVERS_TOOLS}/.evergreen/auth_aws/creds.json) + SESSION_TOKEN=$(urlencode $SESSION_TOKEN) + export MONGODB_URI="mongodb://$USER:$PASS@localhost:27017/aws?authMechanism=MONGODB-AWS&authMechanismProperties=AWS_SESSION_TOKEN:$SESSION_TOKEN" + EOF + - command: shell.exec + type: test + params: + working_dir: src + script: | + ${PREPARE_SHELL} + ${PROJECT_DIRECTORY}/.evergreen/run-mongodb-aws-test.sh + run aws auth test with aws EC2 credentials: + - command: shell.exec + type: test + params: + working_dir: src + script: | + ${PREPARE_SHELL} + cd ${DRIVERS_TOOLS}/.evergreen/auth_aws + ${MONGODB_BINARIES}/mongo aws_e2e_ec2.js + - command: shell.exec + type: test + params: + working_dir: src + script: | + ${PREPARE_SHELL} + ${PROJECT_DIRECTORY}/.evergreen/run-mongodb-aws-test.sh + run aws auth test with aws credentials as environment variables: + - command: shell.exec + type: test + params: + working_dir: src + silent: true + script: | + cat < "${PROJECT_DIRECTORY}/prepare_mongodb_aws.sh" + export AWS_ACCESS_KEY_ID=${iam_auth_ecs_account} + export AWS_SECRET_ACCESS_KEY=${iam_auth_ecs_secret_access_key} + export MONGODB_URI="mongodb://localhost:27017/aws?authMechanism=MONGODB-AWS" + EOF + - command: shell.exec + type: test + params: + working_dir: src + script: | + ${PREPARE_SHELL} + ${PROJECT_DIRECTORY}/.evergreen/run-mongodb-aws-test.sh + run aws auth test with aws credentials and session token as environment variables: + - command: shell.exec + type: test + params: + working_dir: src + silent: true + script: | + cat <<'EOF' > "${PROJECT_DIRECTORY}/prepare_mongodb_aws.sh" + export AWS_ACCESS_KEY_ID=$(jq -r '.AccessKeyId' ${DRIVERS_TOOLS}/.evergreen/auth_aws/creds.json) + export AWS_SECRET_ACCESS_KEY=$(jq -r '.SecretAccessKey' ${DRIVERS_TOOLS}/.evergreen/auth_aws/creds.json) + export AWS_SESSION_TOKEN=$(jq -r '.SessionToken' ${DRIVERS_TOOLS}/.evergreen/auth_aws/creds.json) + export MONGODB_URI="mongodb://localhost:27017/aws?authMechanism=MONGODB-AWS" + EOF + - command: shell.exec + type: test + params: + working_dir: src + script: | + ${PREPARE_SHELL} + ${PROJECT_DIRECTORY}/.evergreen/run-mongodb-aws-test.sh + run aws ECS auth test: + - command: shell.exec + type: test + params: + working_dir: src + script: | + ${PREPARE_SHELL} + AUTH_AWS_DIR=${DRIVERS_TOOLS}/.evergreen/auth_aws + ECS_SRC_DIR=$AUTH_AWS_DIR/src + + # fix issue with `TestData` in SERVER-46340 + sed -i '1s+^+TestData = {};\n+' $AUTH_AWS_DIR/lib/ecs_hosted_test.js + + # pack up project directory to ssh it to the container + mkdir -p $ECS_SRC_DIR/.evergreen + cp $PROJECT_DIRECTORY/.evergreen/run-mongodb-aws-ecs-test.sh $ECS_SRC_DIR/.evergreen + tar -czf $ECS_SRC_DIR/src.tgz -C $PROJECT_DIRECTORY . + + cd $AUTH_AWS_DIR + cat < setup.js + const mongo_binaries = "$MONGODB_BINARIES"; + const project_dir = "$ECS_SRC_DIR"; + EOF + + cat setup.js + mongo --nodb setup.js aws_e2e_ecs.js + run-ocsp-test: + - command: shell.exec + type: test + params: + working_dir: src + script: | + ${PREPARE_SHELL} - NODE_LTS_NAME='${NODE_LTS_NAME}' ATLAS_REPL='${atlas_repl}' ATLAS_SHRD='${atlas_shrd}' - ATLAS_FREE='${atlas_free}' ATLAS_TLS11='${atlas_tls11}' ATLAS_TLS12='${atlas_tls12}' bash - ${PROJECT_DIRECTORY}/.evergreen/run-atlas-tests.sh + UNIFIED=${UNIFIED} \ + CA_FILE="$DRIVERS_TOOLS/.evergreen/ocsp/rsa/ca.pem" \ + OCSP_TLS_SHOULD_SUCCEED="${OCSP_TLS_SHOULD_SUCCEED}" \ + bash ${PROJECT_DIRECTORY}/.evergreen/run-ocsp-tests.sh + run-valid-ocsp-server: + - command: shell.exec + params: + script: | + cd ${DRIVERS_TOOLS}/.evergreen/ocsp + /opt/mongodbtoolchain/v3/bin/python3 -m venv ./venv + ./venv/bin/pip3 install -r ${DRIVERS_TOOLS}/.evergreen/ocsp/mock-ocsp-responder-requirements.txt + - command: shell.exec + params: + background: true + script: | + cd ${DRIVERS_TOOLS}/.evergreen/ocsp + nohup ./venv/bin/python3 ocsp_mock.py \ + --ca_file rsa/ca.pem \ + --ocsp_responder_cert rsa/ca.crt \ + --ocsp_responder_key rsa/ca.key \ + -p 8100 -v + run-revoked-ocsp-server: + - command: shell.exec + params: + script: | + cd ${DRIVERS_TOOLS}/.evergreen/ocsp + /opt/mongodbtoolchain/v3/bin/python3 -m venv ./venv + ./venv/bin/pip3 install -r ${DRIVERS_TOOLS}/.evergreen/ocsp/mock-ocsp-responder-requirements.txt + - command: shell.exec + params: + background: true + script: | + cd ${DRIVERS_TOOLS}/.evergreen/ocsp + nohup ./venv/bin/python3 ocsp_mock.py \ + --ca_file rsa/ca.pem \ + --ocsp_responder_cert rsa/ca.crt \ + --ocsp_responder_key rsa/ca.key \ + -p 8100 \ + -v \ + --fault revoked + upload test results: + - command: attach.xunit_results + params: + file: src/xunit.xml pre: - func: fetch source - func: prepare resources + - func: windows fix - func: fix absolute paths - func: make files executable post: + - func: upload test results - func: cleanup +ignore: + - '*.md' tasks: - name: test-latest-server tags: @@ -195,45 +512,39 @@ tasks: VERSION: latest TOPOLOGY: sharded_cluster - func: run tests - - name: test-latest-server-unified + - name: test-4.4-server tags: - - latest - - server-unified + - '4.4' + - server commands: - func: install dependencies - func: bootstrap mongo-orchestration vars: - VERSION: latest + VERSION: '4.4' TOPOLOGY: server - func: run tests - vars: - UNIFIED: 1 - - name: test-latest-replica_set-unified + - name: test-4.4-replica_set tags: - - latest - - replica_set-unified + - '4.4' + - replica_set commands: - func: install dependencies - func: bootstrap mongo-orchestration vars: - VERSION: latest + VERSION: '4.4' TOPOLOGY: replica_set - func: run tests - vars: - UNIFIED: 1 - - name: test-latest-sharded_cluster-unified + - name: test-4.4-sharded_cluster tags: - - latest - - sharded_cluster-unified + - '4.4' + - sharded_cluster commands: - func: install dependencies - func: bootstrap mongo-orchestration vars: - VERSION: latest + VERSION: '4.4' TOPOLOGY: sharded_cluster - func: run tests - vars: - UNIFIED: 1 - name: test-4.2-server tags: - '4.2' @@ -267,45 +578,6 @@ tasks: VERSION: '4.2' TOPOLOGY: sharded_cluster - func: run tests - - name: test-4.2-server-unified - tags: - - '4.2' - - server-unified - commands: - - func: install dependencies - - func: bootstrap mongo-orchestration - vars: - VERSION: '4.2' - TOPOLOGY: server - - func: run tests - vars: - UNIFIED: 1 - - name: test-4.2-replica_set-unified - tags: - - '4.2' - - replica_set-unified - commands: - - func: install dependencies - - func: bootstrap mongo-orchestration - vars: - VERSION: '4.2' - TOPOLOGY: replica_set - - func: run tests - vars: - UNIFIED: 1 - - name: test-4.2-sharded_cluster-unified - tags: - - '4.2' - - sharded_cluster-unified - commands: - - func: install dependencies - - func: bootstrap mongo-orchestration - vars: - VERSION: '4.2' - TOPOLOGY: sharded_cluster - - func: run tests - vars: - UNIFIED: 1 - name: test-4.0-server tags: - '4.0' @@ -339,855 +611,781 @@ tasks: VERSION: '4.0' TOPOLOGY: sharded_cluster - func: run tests - - name: test-4.0-server-unified + - name: test-3.6-server tags: - - '4.0' - - server-unified + - '3.6' + - server commands: - func: install dependencies - func: bootstrap mongo-orchestration vars: - VERSION: '4.0' + VERSION: '3.6' TOPOLOGY: server - func: run tests - vars: - UNIFIED: 1 - - name: test-4.0-replica_set-unified + - name: test-3.6-replica_set tags: - - '4.0' - - replica_set-unified + - '3.6' + - replica_set commands: - func: install dependencies - func: bootstrap mongo-orchestration vars: - VERSION: '4.0' + VERSION: '3.6' TOPOLOGY: replica_set - func: run tests - vars: - UNIFIED: 1 - - name: test-4.0-sharded_cluster-unified + - name: test-3.6-sharded_cluster tags: - - '4.0' - - sharded_cluster-unified + - '3.6' + - sharded_cluster commands: - func: install dependencies - func: bootstrap mongo-orchestration vars: - VERSION: '4.0' + VERSION: '3.6' TOPOLOGY: sharded_cluster - func: run tests - vars: - UNIFIED: 1 - - name: test-3.6-server + - name: test-3.4-server tags: - - '3.6' + - '3.4' - server commands: - func: install dependencies - func: bootstrap mongo-orchestration vars: - VERSION: '3.6' + VERSION: '3.4' TOPOLOGY: server - func: run tests - - name: test-3.6-replica_set + - name: test-3.4-replica_set tags: - - '3.6' + - '3.4' - replica_set commands: - func: install dependencies - func: bootstrap mongo-orchestration vars: - VERSION: '3.6' + VERSION: '3.4' TOPOLOGY: replica_set - func: run tests - - name: test-3.6-sharded_cluster + - name: test-3.4-sharded_cluster tags: - - '3.6' + - '3.4' - sharded_cluster commands: - func: install dependencies - func: bootstrap mongo-orchestration vars: - VERSION: '3.6' + VERSION: '3.4' TOPOLOGY: sharded_cluster - func: run tests - - name: test-3.6-server-unified + - name: test-3.2-server tags: - - '3.6' - - server-unified + - '3.2' + - server commands: - func: install dependencies - func: bootstrap mongo-orchestration vars: - VERSION: '3.6' + VERSION: '3.2' TOPOLOGY: server - func: run tests - vars: - UNIFIED: 1 - - name: test-3.6-replica_set-unified + - name: test-3.2-replica_set tags: - - '3.6' - - replica_set-unified + - '3.2' + - replica_set commands: - func: install dependencies - func: bootstrap mongo-orchestration vars: - VERSION: '3.6' + VERSION: '3.2' TOPOLOGY: replica_set - func: run tests - vars: - UNIFIED: 1 - - name: test-3.6-sharded_cluster-unified + - name: test-3.2-sharded_cluster tags: - - '3.6' - - sharded_cluster-unified + - '3.2' + - sharded_cluster commands: - func: install dependencies - func: bootstrap mongo-orchestration vars: - VERSION: '3.6' + VERSION: '3.2' TOPOLOGY: sharded_cluster - func: run tests - vars: - UNIFIED: 1 - - name: test-3.4-server + - name: test-3.0-server tags: - - '3.4' + - '3.0' - server commands: - func: install dependencies - func: bootstrap mongo-orchestration vars: - VERSION: '3.4' + VERSION: '3.0' TOPOLOGY: server - func: run tests - - name: test-3.4-replica_set + - name: test-3.0-replica_set tags: - - '3.4' + - '3.0' - replica_set commands: - func: install dependencies - func: bootstrap mongo-orchestration vars: - VERSION: '3.4' + VERSION: '3.0' TOPOLOGY: replica_set - func: run tests - - name: test-3.4-sharded_cluster + - name: test-3.0-sharded_cluster tags: - - '3.4' + - '3.0' - sharded_cluster commands: - func: install dependencies - func: bootstrap mongo-orchestration vars: - VERSION: '3.4' + VERSION: '3.0' TOPOLOGY: sharded_cluster - func: run tests - - name: test-3.4-server-unified + - name: test-2.6-server tags: - - '3.4' - - server-unified + - '2.6' + - server commands: - func: install dependencies - func: bootstrap mongo-orchestration vars: - VERSION: '3.4' + VERSION: '2.6' TOPOLOGY: server - func: run tests - vars: - UNIFIED: 1 - - name: test-3.4-replica_set-unified + - name: test-2.6-replica_set tags: - - '3.4' - - replica_set-unified + - '2.6' + - replica_set commands: - func: install dependencies - func: bootstrap mongo-orchestration vars: - VERSION: '3.4' + VERSION: '2.6' TOPOLOGY: replica_set - func: run tests - vars: - UNIFIED: 1 - - name: test-3.4-sharded_cluster-unified + - name: test-2.6-sharded_cluster tags: - - '3.4' - - sharded_cluster-unified + - '2.6' + - sharded_cluster commands: - func: install dependencies - func: bootstrap mongo-orchestration vars: - VERSION: '3.4' + VERSION: '2.6' TOPOLOGY: sharded_cluster - func: run tests + - name: test-atlas-connectivity + tags: + - atlas-connect + commands: + - func: install dependencies + - func: run atlas tests + - name: test-atlas-data-lake + commands: + - func: install dependencies + - func: bootstrap mongohoused + - func: run data lake tests + - name: test-auth-kerberos + tags: + - auth + - kerberos + commands: + - func: install dependencies + - func: run kerberos tests + - name: test-auth-ldap + tags: + - auth + - ldap + commands: + - func: install dependencies + - func: run ldap tests + - name: test-tls-support + tags: + - tls-support + commands: + - func: install dependencies + - func: bootstrap mongo-orchestration vars: - UNIFIED: 1 - - name: test-3.2-server + SSL: ssl + VERSION: latest + TOPOLOGY: server + - func: run tls tests + - name: test-ocsp-valid-cert-server-staples tags: - - '3.2' - - server + - ocsp commands: + - func: run-valid-ocsp-server - func: install dependencies - func: bootstrap mongo-orchestration vars: - VERSION: '3.2' + ORCHESTRATION_FILE: rsa-basic-tls-ocsp-mustStaple.json + VERSION: latest TOPOLOGY: server - - func: run tests - - name: test-3.2-replica_set + - func: run-ocsp-test + vars: + OCSP_TLS_SHOULD_SUCCEED: 1 + - name: test-ocsp-invalid-cert-server-staples tags: - - '3.2' - - replica_set + - ocsp commands: + - func: run-revoked-ocsp-server - func: install dependencies - func: bootstrap mongo-orchestration vars: - VERSION: '3.2' - TOPOLOGY: replica_set - - func: run tests - - name: test-3.2-sharded_cluster + ORCHESTRATION_FILE: rsa-basic-tls-ocsp-mustStaple.json + VERSION: latest + TOPOLOGY: server + - func: run-ocsp-test + vars: + OCSP_TLS_SHOULD_SUCCEED: 0 + - name: test-ocsp-valid-cert-server-does-not-staple tags: - - '3.2' - - sharded_cluster + - ocsp commands: + - func: run-valid-ocsp-server - func: install dependencies - func: bootstrap mongo-orchestration vars: - VERSION: '3.2' - TOPOLOGY: sharded_cluster - - func: run tests - - name: test-3.2-server-unified + ORCHESTRATION_FILE: rsa-basic-tls-ocsp-disableStapling.json + VERSION: latest + TOPOLOGY: server + - func: run-ocsp-test + vars: + OCSP_TLS_SHOULD_SUCCEED: 1 + - name: test-ocsp-invalid-cert-server-does-not-staple tags: - - '3.2' - - server-unified + - ocsp commands: + - func: run-revoked-ocsp-server - func: install dependencies - func: bootstrap mongo-orchestration vars: - VERSION: '3.2' + ORCHESTRATION_FILE: rsa-basic-tls-ocsp-disableStapling.json + VERSION: latest TOPOLOGY: server - - func: run tests + - func: run-ocsp-test vars: - UNIFIED: 1 - - name: test-3.2-replica_set-unified + OCSP_TLS_SHOULD_SUCCEED: 0 + - name: test-ocsp-soft-fail tags: - - '3.2' - - replica_set-unified + - ocsp commands: - func: install dependencies - func: bootstrap mongo-orchestration vars: - VERSION: '3.2' - TOPOLOGY: replica_set - - func: run tests + ORCHESTRATION_FILE: rsa-basic-tls-ocsp-disableStapling.json + VERSION: latest + TOPOLOGY: server + - func: run-ocsp-test vars: - UNIFIED: 1 - - name: test-3.2-sharded_cluster-unified + OCSP_TLS_SHOULD_SUCCEED: 1 + - name: test-ocsp-malicious-invalid-cert-mustStaple-server-does-not-staple tags: - - '3.2' - - sharded_cluster-unified + - ocsp commands: + - func: run-revoked-ocsp-server - func: install dependencies - func: bootstrap mongo-orchestration vars: - VERSION: '3.2' - TOPOLOGY: sharded_cluster - - func: run tests + ORCHESTRATION_FILE: rsa-basic-tls-ocsp-mustStaple-disableStapling.json + VERSION: latest + TOPOLOGY: server + - func: run-ocsp-test vars: - UNIFIED: 1 - - name: test-3.0-server + OCSP_TLS_SHOULD_SUCCEED: 0 + - name: test-ocsp-malicious-no-responder-mustStaple-server-does-not-staple tags: - - '3.0' - - server + - ocsp commands: - func: install dependencies - func: bootstrap mongo-orchestration vars: - VERSION: '3.0' + ORCHESTRATION_FILE: rsa-basic-tls-ocsp-mustStaple-disableStapling.json + VERSION: latest TOPOLOGY: server - - func: run tests - - name: test-3.0-replica_set + - func: run-ocsp-test + vars: + OCSP_TLS_SHOULD_SUCCEED: 0 + - name: test-latest-ocsp-valid-cert-server-staples tags: - - '3.0' - - replica_set + - ocsp commands: + - func: run-valid-ocsp-server - func: install dependencies - func: bootstrap mongo-orchestration vars: - VERSION: '3.0' - TOPOLOGY: replica_set - - func: run tests - - name: test-3.0-sharded_cluster + ORCHESTRATION_FILE: rsa-basic-tls-ocsp-mustStaple.json + VERSION: latest + TOPOLOGY: server + - func: run-ocsp-test + vars: + OCSP_TLS_SHOULD_SUCCEED: 1 + - name: test-latest-ocsp-invalid-cert-server-staples tags: - - '3.0' - - sharded_cluster + - ocsp commands: + - func: run-revoked-ocsp-server - func: install dependencies - func: bootstrap mongo-orchestration vars: - VERSION: '3.0' - TOPOLOGY: sharded_cluster - - func: run tests - - name: test-3.0-server-unified + ORCHESTRATION_FILE: rsa-basic-tls-ocsp-mustStaple.json + VERSION: latest + TOPOLOGY: server + - func: run-ocsp-test + vars: + OCSP_TLS_SHOULD_SUCCEED: 0 + - name: test-latest-ocsp-valid-cert-server-does-not-staple tags: - - '3.0' - - server-unified + - ocsp commands: + - func: run-valid-ocsp-server - func: install dependencies - func: bootstrap mongo-orchestration vars: - VERSION: '3.0' + ORCHESTRATION_FILE: rsa-basic-tls-ocsp-disableStapling.json + VERSION: latest TOPOLOGY: server - - func: run tests + - func: run-ocsp-test vars: - UNIFIED: 1 - - name: test-3.0-replica_set-unified + OCSP_TLS_SHOULD_SUCCEED: 1 + - name: test-latest-ocsp-invalid-cert-server-does-not-staple tags: - - '3.0' - - replica_set-unified + - ocsp commands: + - func: run-revoked-ocsp-server - func: install dependencies - func: bootstrap mongo-orchestration vars: - VERSION: '3.0' - TOPOLOGY: replica_set - - func: run tests + ORCHESTRATION_FILE: rsa-basic-tls-ocsp-disableStapling.json + VERSION: latest + TOPOLOGY: server + - func: run-ocsp-test vars: - UNIFIED: 1 - - name: test-3.0-sharded_cluster-unified + OCSP_TLS_SHOULD_SUCCEED: 0 + - name: test-latest-ocsp-soft-fail tags: - - '3.0' - - sharded_cluster-unified + - ocsp commands: - func: install dependencies - func: bootstrap mongo-orchestration vars: - VERSION: '3.0' - TOPOLOGY: sharded_cluster - - func: run tests + ORCHESTRATION_FILE: rsa-basic-tls-ocsp-disableStapling.json + VERSION: latest + TOPOLOGY: server + - func: run-ocsp-test vars: - UNIFIED: 1 - - name: test-2.6-server + OCSP_TLS_SHOULD_SUCCEED: 1 + - name: test-latest-ocsp-malicious-invalid-cert-mustStaple-server-does-not-staple tags: - - '2.6' - - server + - ocsp commands: + - func: run-revoked-ocsp-server - func: install dependencies - func: bootstrap mongo-orchestration vars: - VERSION: '2.6' + ORCHESTRATION_FILE: rsa-basic-tls-ocsp-mustStaple-disableStapling.json + VERSION: latest TOPOLOGY: server - - func: run tests - - name: test-2.6-replica_set + - func: run-ocsp-test + vars: + OCSP_TLS_SHOULD_SUCCEED: 0 + - name: test-latest-ocsp-malicious-no-responder-mustStaple-server-does-not-staple tags: - - '2.6' - - replica_set + - ocsp commands: - func: install dependencies - func: bootstrap mongo-orchestration vars: - VERSION: '2.6' - TOPOLOGY: replica_set - - func: run tests - - name: test-2.6-sharded_cluster + ORCHESTRATION_FILE: rsa-basic-tls-ocsp-mustStaple-disableStapling.json + VERSION: latest + TOPOLOGY: server + - func: run-ocsp-test + vars: + OCSP_TLS_SHOULD_SUCCEED: 0 + - name: test-4.4-ocsp-valid-cert-server-staples tags: - - '2.6' - - sharded_cluster + - ocsp commands: + - func: run-valid-ocsp-server - func: install dependencies - func: bootstrap mongo-orchestration vars: - VERSION: '2.6' - TOPOLOGY: sharded_cluster - - func: run tests - - name: test-2.6-server-unified + ORCHESTRATION_FILE: rsa-basic-tls-ocsp-mustStaple.json + VERSION: '4.4' + TOPOLOGY: server + - func: run-ocsp-test + vars: + OCSP_TLS_SHOULD_SUCCEED: 1 + - name: test-4.4-ocsp-invalid-cert-server-staples tags: - - '2.6' - - server-unified + - ocsp commands: + - func: run-revoked-ocsp-server - func: install dependencies - func: bootstrap mongo-orchestration vars: - VERSION: '2.6' + ORCHESTRATION_FILE: rsa-basic-tls-ocsp-mustStaple.json + VERSION: '4.4' TOPOLOGY: server - - func: run tests + - func: run-ocsp-test vars: - UNIFIED: 1 - - name: test-2.6-replica_set-unified + OCSP_TLS_SHOULD_SUCCEED: 0 + - name: test-4.4-ocsp-valid-cert-server-does-not-staple tags: - - '2.6' - - replica_set-unified + - ocsp commands: + - func: run-valid-ocsp-server - func: install dependencies - func: bootstrap mongo-orchestration vars: - VERSION: '2.6' - TOPOLOGY: replica_set - - func: run tests + ORCHESTRATION_FILE: rsa-basic-tls-ocsp-disableStapling.json + VERSION: '4.4' + TOPOLOGY: server + - func: run-ocsp-test vars: - UNIFIED: 1 - - name: test-2.6-sharded_cluster-unified + OCSP_TLS_SHOULD_SUCCEED: 1 + - name: test-4.4-ocsp-invalid-cert-server-does-not-staple tags: - - '2.6' - - sharded_cluster-unified + - ocsp commands: + - func: run-revoked-ocsp-server - func: install dependencies - func: bootstrap mongo-orchestration vars: - VERSION: '2.6' - TOPOLOGY: sharded_cluster - - func: run tests + ORCHESTRATION_FILE: rsa-basic-tls-ocsp-disableStapling.json + VERSION: '4.4' + TOPOLOGY: server + - func: run-ocsp-test vars: - UNIFIED: 1 - - name: test-atlas-connectivity + OCSP_TLS_SHOULD_SUCCEED: 0 + - name: test-4.4-ocsp-soft-fail tags: - - atlas-connect + - ocsp commands: - func: install dependencies - - func: run atlas tests + - func: bootstrap mongo-orchestration + vars: + ORCHESTRATION_FILE: rsa-basic-tls-ocsp-disableStapling.json + VERSION: '4.4' + TOPOLOGY: server + - func: run-ocsp-test + vars: + OCSP_TLS_SHOULD_SUCCEED: 1 + - name: test-4.4-ocsp-malicious-invalid-cert-mustStaple-server-does-not-staple + tags: + - ocsp + commands: + - func: run-revoked-ocsp-server + - func: install dependencies + - func: bootstrap mongo-orchestration + vars: + ORCHESTRATION_FILE: rsa-basic-tls-ocsp-mustStaple-disableStapling.json + VERSION: '4.4' + TOPOLOGY: server + - func: run-ocsp-test + vars: + OCSP_TLS_SHOULD_SUCCEED: 0 + - name: test-4.4-ocsp-malicious-no-responder-mustStaple-server-does-not-staple + tags: + - ocsp + commands: + - func: install dependencies + - func: bootstrap mongo-orchestration + vars: + ORCHESTRATION_FILE: rsa-basic-tls-ocsp-mustStaple-disableStapling.json + VERSION: '4.4' + TOPOLOGY: server + - func: run-ocsp-test + vars: + OCSP_TLS_SHOULD_SUCCEED: 0 + - name: aws-latest-auth-test + commands: + - func: install dependencies + - func: bootstrap mongo-orchestration vars: VERSION: latest + AUTH: auth + ORCHESTRATION_FILE: auth-aws.json + TOPOLOGY: server + - func: add aws auth variables to file + - func: run aws auth test with regular aws credentials + - func: run aws auth test with assume role credentials + - func: run aws auth test with aws EC2 credentials + - func: run aws auth test with aws credentials as environment variables + - func: run aws auth test with aws credentials and session token as environment variables + - func: run aws ECS auth test + - name: aws-4.4-auth-test + commands: + - func: install dependencies + - func: bootstrap mongo-orchestration + vars: + VERSION: '4.4' + AUTH: auth + ORCHESTRATION_FILE: auth-aws.json + TOPOLOGY: server + - func: add aws auth variables to file + - func: run aws auth test with regular aws credentials + - func: run aws auth test with assume role credentials + - func: run aws auth test with aws EC2 credentials + - func: run aws auth test with aws credentials as environment variables + - func: run aws auth test with aws credentials and session token as environment variables + - func: run aws ECS auth test + - name: run-checks + tags: + - run-checks + commands: + - func: install dependencies + vars: + NODE_LTS_NAME: erbium + - func: run checks + - name: run-mongosh-integration-tests + tags: + - run-mongosh-integration-tests + exec_timeout_secs: 3600 + commands: + - func: install dependencies + vars: + NODE_LTS_NAME: fermium + - func: run mongosh integration tests buildvariants: - - name: debian71-test-boron - display_name: Debian 7.1 Node Boron - run_on: debian71-test + - name: macos-1014-dubnium + display_name: macOS 10.14 Node Dubnium + run_on: macos-1014 expansions: - NODE_LTS_NAME: boron + NODE_LTS_NAME: dubnium tasks: &ref_0 + - test-latest-server + - test-latest-replica_set + - test-latest-sharded_cluster + - test-4.4-server + - test-4.4-replica_set + - test-4.4-sharded_cluster + - test-4.2-server + - test-4.2-replica_set + - test-4.2-sharded_cluster + - test-4.0-server + - test-4.0-replica_set + - test-4.0-sharded_cluster - test-3.6-server - test-3.6-replica_set - test-3.6-sharded_cluster - - test-3.6-server-unified - - test-3.6-replica_set-unified - - test-3.6-sharded_cluster-unified - test-3.4-server - test-3.4-replica_set - test-3.4-sharded_cluster - - test-3.4-server-unified - - test-3.4-replica_set-unified - - test-3.4-sharded_cluster-unified - test-3.2-server - test-3.2-replica_set - test-3.2-sharded_cluster - - test-3.2-server-unified - - test-3.2-replica_set-unified - - test-3.2-sharded_cluster-unified - test-3.0-server - test-3.0-replica_set - test-3.0-sharded_cluster - - test-3.0-server-unified - - test-3.0-replica_set-unified - - test-3.0-sharded_cluster-unified - test-2.6-server - test-2.6-replica_set - test-2.6-sharded_cluster - - test-2.6-server-unified - - test-2.6-replica_set-unified - - test-2.6-sharded_cluster-unified - - name: debian71-test-argon - display_name: Debian 7.1 Node Argon - run_on: debian71-test + - test-atlas-connectivity + - test-atlas-data-lake + - test-auth-kerberos + - test-auth-ldap + - test-tls-support + - test-ocsp-valid-cert-server-staples + - test-ocsp-invalid-cert-server-staples + - test-ocsp-valid-cert-server-does-not-staple + - test-ocsp-invalid-cert-server-does-not-staple + - test-ocsp-soft-fail + - test-ocsp-malicious-invalid-cert-mustStaple-server-does-not-staple + - test-ocsp-malicious-no-responder-mustStaple-server-does-not-staple + - test-latest-ocsp-valid-cert-server-staples + - test-latest-ocsp-invalid-cert-server-staples + - test-latest-ocsp-valid-cert-server-does-not-staple + - test-latest-ocsp-invalid-cert-server-does-not-staple + - test-latest-ocsp-soft-fail + - test-latest-ocsp-malicious-invalid-cert-mustStaple-server-does-not-staple + - test-latest-ocsp-malicious-no-responder-mustStaple-server-does-not-staple + - test-4.4-ocsp-valid-cert-server-staples + - test-4.4-ocsp-invalid-cert-server-staples + - test-4.4-ocsp-valid-cert-server-does-not-staple + - test-4.4-ocsp-invalid-cert-server-does-not-staple + - test-4.4-ocsp-soft-fail + - test-4.4-ocsp-malicious-invalid-cert-mustStaple-server-does-not-staple + - test-4.4-ocsp-malicious-no-responder-mustStaple-server-does-not-staple + - name: macos-1014-erbium + display_name: macOS 10.14 Node Erbium + run_on: macos-1014 expansions: - NODE_LTS_NAME: argon + NODE_LTS_NAME: erbium tasks: *ref_0 - - name: debian81-test-dubnium - display_name: Debian 8.1 Node Dubnium - run_on: debian81-test + - name: rhel70-dubnium + display_name: RHEL 7.0 Node Dubnium + run_on: rhel70-small expansions: NODE_LTS_NAME: dubnium - tasks: &ref_1 - - test-4.0-server - - test-4.0-replica_set - - test-4.0-sharded_cluster - - test-4.0-server-unified - - test-4.0-replica_set-unified - - test-4.0-sharded_cluster-unified - - test-3.6-server - - test-3.6-replica_set - - test-3.6-sharded_cluster - - test-3.6-server-unified - - test-3.6-replica_set-unified - - test-3.6-sharded_cluster-unified - - test-3.4-server - - test-3.4-replica_set - - test-3.4-sharded_cluster - - test-3.4-server-unified - - test-3.4-replica_set-unified - - test-3.4-sharded_cluster-unified - - name: debian81-test-carbon - display_name: Debian 8.1 Node Carbon - run_on: debian81-test - expansions: - NODE_LTS_NAME: carbon - tasks: *ref_1 - - name: debian81-test-boron - display_name: Debian 8.1 Node Boron - run_on: debian81-test - expansions: - NODE_LTS_NAME: boron - tasks: *ref_1 - - name: debian81-test-argon - display_name: Debian 8.1 Node Argon - run_on: debian81-test - expansions: - NODE_LTS_NAME: argon - tasks: *ref_1 - - name: linux-64-amzn-test-boron - display_name: Amazon Linux (Enterprise) Node Boron - run_on: linux-64-amzn-test - expansions: - NODE_LTS_NAME: boron tasks: *ref_0 - - name: linux-64-amzn-test-argon - display_name: Amazon Linux (Enterprise) Node Argon - run_on: linux-64-amzn-test + - name: rhel70-erbium + display_name: RHEL 7.0 Node Erbium + run_on: rhel70-small expansions: - NODE_LTS_NAME: argon + NODE_LTS_NAME: erbium tasks: *ref_0 - - name: macos-1014-dubnium - display_name: macOS 10.14 Node Dubnium - run_on: macos-1014 + - name: ubuntu-14.04-dubnium + display_name: Ubuntu 14.04 Node Dubnium + run_on: ubuntu1404-large expansions: NODE_LTS_NAME: dubnium - tasks: &ref_2 - - test-latest-server - - test-latest-replica_set - - test-latest-sharded_cluster - - test-latest-server-unified - - test-latest-replica_set-unified - - test-latest-sharded_cluster-unified - - test-4.2-server - - test-4.2-replica_set - - test-4.2-sharded_cluster - - test-4.2-server-unified - - test-4.2-replica_set-unified - - test-4.2-sharded_cluster-unified + tasks: &ref_1 - test-4.0-server - test-4.0-replica_set - test-4.0-sharded_cluster - - test-4.0-server-unified - - test-4.0-replica_set-unified - - test-4.0-sharded_cluster-unified - test-3.6-server - test-3.6-replica_set - test-3.6-sharded_cluster - - test-3.6-server-unified - - test-3.6-replica_set-unified - - test-3.6-sharded_cluster-unified - test-3.4-server - test-3.4-replica_set - test-3.4-sharded_cluster - - test-3.4-server-unified - - test-3.4-replica_set-unified - - test-3.4-sharded_cluster-unified - test-3.2-server - test-3.2-replica_set - test-3.2-sharded_cluster - - test-3.2-server-unified - - test-3.2-replica_set-unified - - test-3.2-sharded_cluster-unified - test-3.0-server - test-3.0-replica_set - test-3.0-sharded_cluster - - test-3.0-server-unified - - test-3.0-replica_set-unified - - test-3.0-sharded_cluster-unified - test-2.6-server - test-2.6-replica_set - test-2.6-sharded_cluster - - test-2.6-server-unified - - test-2.6-replica_set-unified - - test-2.6-sharded_cluster-unified - test-atlas-connectivity - - name: macos-1014-carbon - display_name: macOS 10.14 Node Carbon - run_on: macos-1014 - expansions: - NODE_LTS_NAME: carbon - tasks: *ref_2 - - name: macos-1014-boron - display_name: macOS 10.14 Node Boron - run_on: macos-1014 - expansions: - NODE_LTS_NAME: boron - tasks: *ref_2 - - name: macos-1014-argon - display_name: macOS 10.14 Node Argon - run_on: macos-1014 - expansions: - NODE_LTS_NAME: argon - tasks: *ref_2 - - name: rhel70-dubnium - display_name: RHEL 7.0 Node Dubnium - run_on: rhel70-small - expansions: - NODE_LTS_NAME: dubnium - tasks: *ref_2 - - name: rhel70-carbon - display_name: RHEL 7.0 Node Carbon - run_on: rhel70-small + - test-atlas-data-lake + - test-auth-kerberos + - test-auth-ldap + - name: ubuntu-14.04-erbium + display_name: Ubuntu 14.04 Node Erbium + run_on: ubuntu1404-large expansions: - NODE_LTS_NAME: carbon - tasks: *ref_2 - - name: rhel70-boron - display_name: RHEL 7.0 Node Boron - run_on: rhel70-small - expansions: - NODE_LTS_NAME: boron - tasks: *ref_2 - - name: rhel70-argon - display_name: RHEL 7.0 Node Argon - run_on: rhel70-small - expansions: - NODE_LTS_NAME: argon - tasks: *ref_2 - - name: rhel71-power8-test-dubnium - display_name: RHEL 7.1 (POWER8) Node Dubnium - run_on: rhel71-power8-test + NODE_LTS_NAME: erbium + tasks: *ref_1 + - name: ubuntu-18.04-dubnium + display_name: Ubuntu 18.04 Node Dubnium + run_on: ubuntu1804-large expansions: NODE_LTS_NAME: dubnium - tasks: &ref_3 + CLIENT_ENCRYPTION: true + tasks: &ref_2 - test-latest-server - test-latest-replica_set - test-latest-sharded_cluster - - test-latest-server-unified - - test-latest-replica_set-unified - - test-latest-sharded_cluster-unified + - test-4.4-server + - test-4.4-replica_set + - test-4.4-sharded_cluster - test-4.2-server - test-4.2-replica_set - test-4.2-sharded_cluster - - test-4.2-server-unified - - test-4.2-replica_set-unified - - test-4.2-sharded_cluster-unified - test-4.0-server - test-4.0-replica_set - test-4.0-sharded_cluster - - test-4.0-server-unified - - test-4.0-replica_set-unified - - test-4.0-sharded_cluster-unified - test-3.6-server - test-3.6-replica_set - test-3.6-sharded_cluster - - test-3.6-server-unified - - test-3.6-replica_set-unified - - test-3.6-sharded_cluster-unified - test-3.4-server - test-3.4-replica_set - test-3.4-sharded_cluster - - test-3.4-server-unified - - test-3.4-replica_set-unified - - test-3.4-sharded_cluster-unified - test-3.2-server - test-3.2-replica_set - test-3.2-sharded_cluster - - test-3.2-server-unified - - test-3.2-replica_set-unified - - test-3.2-sharded_cluster-unified - test-atlas-connectivity - - name: rhel71-power8-test-carbon - display_name: RHEL 7.1 (POWER8) Node Carbon - run_on: rhel71-power8-test - expansions: - NODE_LTS_NAME: carbon - tasks: *ref_3 - - name: rhel71-power8-test-boron - display_name: RHEL 7.1 (POWER8) Node Boron - run_on: rhel71-power8-test - expansions: - NODE_LTS_NAME: boron - tasks: *ref_3 - - name: rhel71-power8-test-argon - display_name: RHEL 7.1 (POWER8) Node Argon - run_on: rhel71-power8-test - expansions: - NODE_LTS_NAME: argon - tasks: *ref_3 - - name: suse12-x86-64-test-dubnium - display_name: SUSE 12 (x86_64) Node Dubnium - run_on: suse12-test - expansions: - NODE_LTS_NAME: dubnium - tasks: *ref_3 - - name: suse12-x86-64-test-carbon - display_name: SUSE 12 (x86_64) Node Carbon - run_on: suse12-test - expansions: - NODE_LTS_NAME: carbon - tasks: *ref_3 - - name: suse12-x86-64-test-boron - display_name: SUSE 12 (x86_64) Node Boron - run_on: suse12-test - expansions: - NODE_LTS_NAME: boron - tasks: *ref_3 - - name: suse12-x86-64-test-argon - display_name: SUSE 12 (x86_64) Node Argon - run_on: suse12-test + - test-atlas-data-lake + - test-auth-kerberos + - test-auth-ldap + - test-tls-support + - test-ocsp-valid-cert-server-staples + - test-ocsp-invalid-cert-server-staples + - test-ocsp-valid-cert-server-does-not-staple + - test-ocsp-invalid-cert-server-does-not-staple + - test-ocsp-soft-fail + - test-ocsp-malicious-invalid-cert-mustStaple-server-does-not-staple + - test-ocsp-malicious-no-responder-mustStaple-server-does-not-staple + - test-latest-ocsp-valid-cert-server-staples + - test-latest-ocsp-invalid-cert-server-staples + - test-latest-ocsp-valid-cert-server-does-not-staple + - test-latest-ocsp-invalid-cert-server-does-not-staple + - test-latest-ocsp-soft-fail + - test-latest-ocsp-malicious-invalid-cert-mustStaple-server-does-not-staple + - test-latest-ocsp-malicious-no-responder-mustStaple-server-does-not-staple + - test-4.4-ocsp-valid-cert-server-staples + - test-4.4-ocsp-invalid-cert-server-staples + - test-4.4-ocsp-valid-cert-server-does-not-staple + - test-4.4-ocsp-invalid-cert-server-does-not-staple + - test-4.4-ocsp-soft-fail + - test-4.4-ocsp-malicious-invalid-cert-mustStaple-server-does-not-staple + - test-4.4-ocsp-malicious-no-responder-mustStaple-server-does-not-staple + - name: ubuntu-18.04-erbium + display_name: Ubuntu 18.04 Node Erbium + run_on: ubuntu1804-large expansions: - NODE_LTS_NAME: argon - tasks: *ref_3 - - name: ubuntu-14.04-dubnium - display_name: Ubuntu 14.04 Node Dubnium - run_on: ubuntu1404-test + NODE_LTS_NAME: erbium + CLIENT_ENCRYPTION: true + tasks: *ref_2 + - name: windows-64-vs2015-dubnium + display_name: Windows (VS2015) Node Dubnium + run_on: windows-64-vs2015-large expansions: NODE_LTS_NAME: dubnium - tasks: &ref_4 + MSVS_VERSION: 2015 + tasks: &ref_3 + - test-4.2-server + - test-4.2-replica_set + - test-4.2-sharded_cluster - test-4.0-server - test-4.0-replica_set - test-4.0-sharded_cluster - - test-4.0-server-unified - - test-4.0-replica_set-unified - - test-4.0-sharded_cluster-unified - test-3.6-server - test-3.6-replica_set - test-3.6-sharded_cluster - - test-3.6-server-unified - - test-3.6-replica_set-unified - - test-3.6-sharded_cluster-unified - test-3.4-server - test-3.4-replica_set - test-3.4-sharded_cluster - - test-3.4-server-unified - - test-3.4-replica_set-unified - - test-3.4-sharded_cluster-unified - test-3.2-server - test-3.2-replica_set - test-3.2-sharded_cluster - - test-3.2-server-unified - - test-3.2-replica_set-unified - - test-3.2-sharded_cluster-unified - test-3.0-server - test-3.0-replica_set - test-3.0-sharded_cluster - - test-3.0-server-unified - - test-3.0-replica_set-unified - - test-3.0-sharded_cluster-unified - test-2.6-server - test-2.6-replica_set - test-2.6-sharded_cluster - - test-2.6-server-unified - - test-2.6-replica_set-unified - - test-2.6-sharded_cluster-unified - - name: ubuntu-14.04-carbon - display_name: Ubuntu 14.04 Node Carbon - run_on: ubuntu1404-test - expansions: - NODE_LTS_NAME: carbon - tasks: *ref_4 - - name: ubuntu-14.04-boron - display_name: Ubuntu 14.04 Node Boron - run_on: ubuntu1404-test - expansions: - NODE_LTS_NAME: boron - tasks: *ref_4 - - name: ubuntu-14.04-argon - display_name: Ubuntu 14.04 Node Argon - run_on: ubuntu1404-test + - name: windows-64-vs2015-erbium + display_name: Windows (VS2015) Node Erbium + run_on: windows-64-vs2015-large expansions: - NODE_LTS_NAME: argon - tasks: *ref_4 - - name: ubuntu-16.04-dubnium - display_name: Ubuntu 16.04 Node Dubnium - run_on: ubuntu1604-test - expansions: - NODE_LTS_NAME: dubnium - CLIENT_ENCRYPTION: true + NODE_LTS_NAME: erbium + MSVS_VERSION: 2015 tasks: *ref_3 - - name: ubuntu-16.04-carbon - display_name: Ubuntu 16.04 Node Carbon - run_on: ubuntu1604-test + - name: windows-64-vs2017-dubnium + display_name: Windows (VS2017) Node Dubnium + run_on: windows-64-vs2017-large expansions: - NODE_LTS_NAME: carbon - CLIENT_ENCRYPTION: true + NODE_LTS_NAME: dubnium + MSVS_VERSION: 2017 tasks: *ref_3 - - name: ubuntu-16.04-boron - display_name: Ubuntu 16.04 Node Boron - run_on: ubuntu1604-test + - name: windows-64-vs2017-erbium + display_name: Windows (VS2017) Node Erbium + run_on: windows-64-vs2017-large expansions: - NODE_LTS_NAME: boron - CLIENT_ENCRYPTION: true + NODE_LTS_NAME: erbium + MSVS_VERSION: 2017 tasks: *ref_3 - - name: ubuntu1604-arm64-small-dubnium - display_name: Ubuntu 16.04 (ARM64) Node Dubnium - run_on: ubuntu1604-arm64-small - expansions: - NODE_LTS_NAME: dubnium - tasks: *ref_1 - - name: ubuntu1604-arm64-small-carbon - display_name: Ubuntu 16.04 (ARM64) Node Carbon - run_on: ubuntu1604-arm64-small - expansions: - NODE_LTS_NAME: carbon - tasks: *ref_1 - - name: ubuntu1604-arm64-small-boron - display_name: Ubuntu 16.04 (ARM64) Node Boron - run_on: ubuntu1604-arm64-small - expansions: - NODE_LTS_NAME: boron - tasks: *ref_1 - - name: ubuntu1604-arm64-small-argon - display_name: Ubuntu 16.04 (ARM64) Node Argon - run_on: ubuntu1604-arm64-small - expansions: - NODE_LTS_NAME: argon - tasks: *ref_1 - - name: ubuntu1604-power8-test-dubnium - display_name: Ubuntu 16.04 (POWER8) Node Dubnium - run_on: ubuntu1604-power8-test + - name: lint + display_name: lint + run_on: rhel70 + tasks: + - run-checks + - name: mongosh_integration_tests + display_name: mongosh integration tests + run_on: ubuntu1804-test + tasks: + - run-mongosh-integration-tests + - name: ubuntu1804-test-mongodb-aws + display_name: MONGODB-AWS Auth test + run_on: ubuntu1804-test expansions: NODE_LTS_NAME: dubnium - tasks: *ref_1 - - name: ubuntu1604-power8-test-carbon - display_name: Ubuntu 16.04 (POWER8) Node Carbon - run_on: ubuntu1604-power8-test - expansions: - NODE_LTS_NAME: carbon - tasks: *ref_1 - - name: ubuntu1604-power8-test-boron - display_name: Ubuntu 16.04 (POWER8) Node Boron - run_on: ubuntu1604-power8-test - expansions: - NODE_LTS_NAME: boron - tasks: *ref_1 - - name: ubuntu1604-power8-test-argon - display_name: Ubuntu 16.04 (POWER8) Node Argon - run_on: ubuntu1604-power8-test - expansions: - NODE_LTS_NAME: argon - tasks: *ref_1 - - name: ubuntu1804-arm64-test-dubnium - display_name: Ubuntu 18.04 (ARM64) Node Dubnium - run_on: ubuntu1804-arm64-test - expansions: - NODE_LTS_NAME: dubnium - tasks: &ref_5 - - test-latest-server - - test-latest-replica_set - - test-latest-sharded_cluster - - test-latest-server-unified - - test-latest-replica_set-unified - - test-latest-sharded_cluster-unified - - test-4.2-server - - test-4.2-replica_set - - test-4.2-sharded_cluster - - test-4.2-server-unified - - test-4.2-replica_set-unified - - test-4.2-sharded_cluster-unified - - test-atlas-connectivity - - name: ubuntu1804-arm64-test-carbon - display_name: Ubuntu 18.04 (ARM64) Node Carbon - run_on: ubuntu1804-arm64-test - expansions: - NODE_LTS_NAME: carbon - tasks: *ref_5 - - name: ubuntu1804-arm64-test-boron - display_name: Ubuntu 18.04 (ARM64) Node Boron - run_on: ubuntu1804-arm64-test - expansions: - NODE_LTS_NAME: boron - tasks: *ref_5 - - name: ubuntu1804-arm64-test-argon - display_name: Ubuntu 18.04 (ARM64) Node Argon - run_on: ubuntu1804-arm64-test - expansions: - NODE_LTS_NAME: argon - tasks: *ref_5 + tasks: + - aws-latest-auth-test + - aws-4.4-auth-test diff --git a/.evergreen/config.yml.in b/.evergreen/config.yml.in index e43e3eea6f9..202cd9ef2a9 100644 --- a/.evergreen/config.yml.in +++ b/.evergreen/config.yml.in @@ -26,10 +26,8 @@ functions: - command: git.get_project params: directory: "src" - # Applies the submitted patch, if any - # Deprecated. Should be removed. But still needed for certain agents (ZAP) - - command: git.apply_patch - # Make an evergreen exapanstion file with dynamic values + shallow_clone: true # speed things up by limiting clone depth to 100 + # Make an evergreen expansion file with dynamic values - command: shell.exec params: working_dir: "src" @@ -42,11 +40,20 @@ functions: fi export DRIVERS_TOOLS="$(pwd)/../drivers-tools" + export PROJECT_DIRECTORY="$(pwd)" export MONGO_ORCHESTRATION_HOME="$DRIVERS_TOOLS/.evergreen/orchestration" export MONGODB_BINARIES="$DRIVERS_TOOLS/mongodb/bin" export UPLOAD_BUCKET="${project}" + # fix paths on windows + if [ "Windows_NT" = "$OS" ]; then + export DRIVERS_TOOLS=$(cygpath -m -a $DRIVERS_TOOLS) + export MONGO_ORCHESTRATION_HOME=$(cygpath -m -a $MONGO_ORCHESTRATION_HOME) + export MONGODB_BINARIES=$(cygpath -m -a $MONGODB_BINARIES) + export PROJECT_DIRECTORY=$(cygpath -m -a $PROJECT_DIRECTORY) + fi + cat < expansion.yml CURRENT_VERSION: "$CURRENT_VERSION" DRIVERS_TOOLS: "$DRIVERS_TOOLS" @@ -80,13 +87,7 @@ functions: params: script: | ${PREPARE_SHELL} - rm -rf $DRIVERS_TOOLS - if [ "${project}" = "drivers-tools" ]; then - # If this was a patch build, doing a fresh clone would not actually test the patch - cp -R ${PROJECT_DIRECTORY}/ $DRIVERS_TOOLS - else - git clone git://github.com/mongodb-labs/drivers-evergreen-tools.git $DRIVERS_TOOLS - fi + git clone --depth 1 git://github.com/mongodb-labs/drivers-evergreen-tools.git $DRIVERS_TOOLS echo "{ \"releases\": { \"default\": \"$MONGODB_BINARIES\" }}" > $MONGO_ORCHESTRATION_HOME/orchestration.config "bootstrap mongo-orchestration": @@ -94,12 +95,28 @@ functions: params: script: | ${PREPARE_SHELL} - MONGODB_VERSION=${VERSION} TOPOLOGY=${TOPOLOGY} bash ${DRIVERS_TOOLS}/.evergreen/run-orchestration.sh + MONGODB_VERSION=${VERSION} TOPOLOGY=${TOPOLOGY} \ + AUTH=${AUTH} SSL=${SSL} \ + ORCHESTRATION_FILE=${ORCHESTRATION_FILE} \ + bash ${DRIVERS_TOOLS}/.evergreen/run-orchestration.sh # run-orchestration generates expansion file with the MONGODB_URI for the cluster - command: expansions.update params: file: mo-expansion.yml + "bootstrap mongohoused": + - command: shell.exec + params: + script: | + ${PREPARE_SHELL} + DRIVERS_TOOLS="${DRIVERS_TOOLS}" bash ${DRIVERS_TOOLS}/.evergreen/atlas_data_lake/build-mongohouse-local.sh + - command: shell.exec + params: + background: true + script: | + ${PREPARE_SHELL} + DRIVERS_TOOLS="${DRIVERS_TOOLS}" bash ${DRIVERS_TOOLS}/.evergreen/atlas_data_lake/run-mongohouse-local.sh + "run tests": - command: shell.exec type: test @@ -118,6 +135,7 @@ functions: type: test params: working_dir: "src" + timeout_secs: 60 script: | ${PREPARE_SHELL} @@ -128,11 +146,32 @@ functions: rm -f ./prepare_client_encryption.sh fi - AUTH=${AUTH} SSL=${SSL} UNIFIED=${UNIFIED} MONGODB_URI="${MONGODB_URI}" bash ${PROJECT_DIRECTORY}/.evergreen/run-tests.sh + AUTH=${AUTH} SSL=${SSL} UNIFIED=${UNIFIED} MONGODB_URI="${MONGODB_URI}" \ + NODE_VERSION=${NODE_VERSION} SKIP_DEPS=1 NO_EXIT=1 \ + bash ${PROJECT_DIRECTORY}/.evergreen/run-tests.sh + + "run checks": + - command: shell.exec + type: test + params: + working_dir: "src" + script: | + ${PREPARE_SHELL} + bash ${PROJECT_DIRECTORY}/.evergreen/run-checks.sh + + "run mongosh integration tests": + - command: shell.exec + type: test + params: + working_dir: "src" + script: | + ${PREPARE_SHELL} + bash ${PROJECT_DIRECTORY}/.evergreen/run-mongosh-integration-tests.sh "cleanup": - command: shell.exec params: + silent: true script: | ${PREPARE_SHELL} rm -rf $DRIVERS_TOOLS || true @@ -140,27 +179,30 @@ functions: "fix absolute paths": - command: shell.exec params: + silent: true script: | ${PREPARE_SHELL} for filename in $(find ${DRIVERS_TOOLS} -name \*.json); do perl -p -i -e "s|ABSOLUTE_PATH_REPLACEMENT_TOKEN|${DRIVERS_TOOLS}|g" $filename done - # "windows fix": - # - command: shell.exec - # params: - # script: | - # ${PREPARE_SHELL} - # for i in $(find ${DRIVERS_TOOLS}/.evergreen ${PROJECT_DIRECTORY}/.evergreen -name \*.sh); do - # cat $i | tr -d '\r' > $i.new - # mv $i.new $i - # done - # # Copy client certificate because symlinks do not work on Windows. - # cp ${DRIVERS_TOOLS}/.evergreen/x509gen/client.pem ${MONGO_ORCHESTRATION_HOME}/lib/client.pem + "windows fix": + - command: shell.exec + params: + silent: true + script: | + ${PREPARE_SHELL} + # for i in $(find ${DRIVERS_TOOLS}/.evergreen ${PROJECT_DIRECTORY}/.evergreen -name \*.sh); do + # cat $i | tr -d '\r' > $i.new + # mv $i.new $i + # done + # Copy client certificate because symlinks do not work on Windows. + cp ${DRIVERS_TOOLS}/.evergreen/x509gen/client.pem ${MONGO_ORCHESTRATION_HOME}/lib/client.pem "make files executable": - command: shell.exec params: + silent: true script: | ${PREPARE_SHELL} for i in $(find ${DRIVERS_TOOLS}/.evergreen ${PROJECT_DIRECTORY}/.evergreen -name \*.sh); do @@ -174,24 +216,312 @@ functions: working_dir: "src" script: | ${PREPARE_SHELL} - NODE_LTS_NAME=${NODE_LTS_NAME} bash ${PROJECT_DIRECTORY}/.evergreen/install-dependencies.sh + NODE_LTS_NAME=${NODE_LTS_NAME} MSVS_VERSION=${MSVS_VERSION} \ + bash ${PROJECT_DIRECTORY}/.evergreen/install-dependencies.sh + - command: expansions.update + params: + file: src/deps-expansion.yml "run atlas tests": + - command: shell.exec + type: test + params: + silent: true + working_dir: "src" + script: | + cat < prepare_atlas_connectivity.sh + export ATLAS_CONNECTIVITY='${ATLAS_CONNECTIVITY}' + EOT + - command: shell.exec + type: test + params: + working_dir: "src" + script: | + # Disable xtrace (just in case it was accidentally set). + set +x + . ./prepare_atlas_connectivity.sh + rm -f ./prepare_atlas_connectivity.sh + + NODE_LTS_NAME='${NODE_LTS_NAME}' bash ${PROJECT_DIRECTORY}/.evergreen/run-atlas-tests.sh + + "run kerberos tests": + - command: shell.exec + type: test + params: + working_dir: src + script: | + KRB5_KEYTAB='${gssapi_auth_keytab_base64}' KRB5_PRINCIPAL='${gssapi_auth_principal}' \ + MONGODB_URI='${gssapi_auth_mongodb_uri}' \ + NODE_LTS_NAME='${NODE_LTS_NAME}' bash ${PROJECT_DIRECTORY}/.evergreen/run-kerberos-tests.sh + + "run ldap tests": + - command: shell.exec + type: test + params: + working_dir: "src" + script: | + MONGODB_URI='${plain_auth_mongodb_uri}' NODE_LTS_NAME='${NODE_LTS_NAME}' \ + bash ${PROJECT_DIRECTORY}/.evergreen/run-ldap-tests.sh + + "run data lake tests": + - command: shell.exec + type: test + params: + working_dir: src + script: | + MONGODB_URI='mongodb://mhuser:pencil@localhost' NODE_LTS_NAME='${NODE_LTS_NAME}' \ + bash ${PROJECT_DIRECTORY}/.evergreen/run-data-lake-tests.sh + + "run tls tests": + - command: shell.exec + type: test + params: + working_dir: "src" + script: | + NODE_LTS_NAME=${NODE_LTS_NAME} DRIVERS_TOOLS="${DRIVERS_TOOLS}" \ + SSL_CA_FILE="${SSL_CA_FILE}" SSL_KEY_FILE="${SSL_KEY_FILE}" \ + MONGODB_URI="${MONGODB_URI}" bash ${PROJECT_DIRECTORY}/.evergreen/run-tls-tests.sh + + "add aws auth variables to file": - command: shell.exec type: test params: working_dir: "src" silent: true script: | - # DO NOT ECHO WITH XTRACE (which PREPARE_SHELL does) - NODE_LTS_NAME='${NODE_LTS_NAME}' ATLAS_REPL='${atlas_repl}' ATLAS_SHRD='${atlas_shrd}' ATLAS_FREE='${atlas_free}' ATLAS_TLS11='${atlas_tls11}' ATLAS_TLS12='${atlas_tls12}' bash ${PROJECT_DIRECTORY}/.evergreen/run-atlas-tests.sh + cat < ${DRIVERS_TOOLS}/.evergreen/auth_aws/aws_e2e_setup.json + { + "iam_auth_ecs_account" : "${iam_auth_ecs_account}", + "iam_auth_ecs_secret_access_key" : "${iam_auth_ecs_secret_access_key}", + "iam_auth_ecs_account_arn": "arn:aws:iam::557821124784:user/authtest_fargate_user", + "iam_auth_ecs_cluster": "${iam_auth_ecs_cluster}", + "iam_auth_ecs_task_definition": "${iam_auth_ecs_task_definition}", + "iam_auth_ecs_subnet_a": "${iam_auth_ecs_subnet_a}", + "iam_auth_ecs_subnet_b": "${iam_auth_ecs_subnet_b}", + "iam_auth_ecs_security_group": "${iam_auth_ecs_security_group}", + "iam_auth_assume_aws_account" : "${iam_auth_assume_aws_account}", + "iam_auth_assume_aws_secret_access_key" : "${iam_auth_assume_aws_secret_access_key}", + "iam_auth_assume_role_name" : "${iam_auth_assume_role_name}", + "iam_auth_ec2_instance_account" : "${iam_auth_ec2_instance_account}", + "iam_auth_ec2_instance_secret_access_key" : "${iam_auth_ec2_instance_secret_access_key}", + "iam_auth_ec2_instance_profile" : "${iam_auth_ec2_instance_profile}" + } + EOF + + "run aws auth test with regular aws credentials": + - command: shell.exec + type: test + params: + working_dir: "src" + script: | + ${PREPARE_SHELL} + cd ${DRIVERS_TOOLS}/.evergreen/auth_aws + ${MONGODB_BINARIES}/mongo aws_e2e_regular_aws.js + - command: shell.exec + type: test + params: + working_dir: "src" + silent: true + script: | + cat <<'EOF' > "${PROJECT_DIRECTORY}/prepare_mongodb_aws.sh" + alias urlencode='python -c "import sys, urllib as ul; print ul.quote_plus(sys.argv[1])"' + USER=$(urlencode ${iam_auth_ecs_account}) + PASS=$(urlencode ${iam_auth_ecs_secret_access_key}) + export MONGODB_URI="mongodb://$USER:$PASS@localhost:27017/aws?authMechanism=MONGODB-AWS" + EOF + - command: shell.exec + type: test + params: + working_dir: "src" + script: | + ${PREPARE_SHELL} + ${PROJECT_DIRECTORY}/.evergreen/run-mongodb-aws-test.sh + + "run aws auth test with assume role credentials": + - command: shell.exec + type: test + params: + working_dir: "src" + script: | + ${PREPARE_SHELL} + cd ${DRIVERS_TOOLS}/.evergreen/auth_aws + ${MONGODB_BINARIES}/mongo aws_e2e_assume_role.js + - command: shell.exec + type: test + params: + working_dir: "src" + silent: true + script: | + cat <<'EOF' > "${PROJECT_DIRECTORY}/prepare_mongodb_aws.sh" + alias urlencode='python -c "import sys, urllib as ul; print ul.quote_plus(sys.argv[1])"' + USER=$(jq -r '.AccessKeyId' ${DRIVERS_TOOLS}/.evergreen/auth_aws/creds.json) + USER=$(urlencode $USER) + PASS=$(jq -r '.SecretAccessKey' ${DRIVERS_TOOLS}/.evergreen/auth_aws/creds.json) + PASS=$(urlencode $PASS) + SESSION_TOKEN=$(jq -r '.SessionToken' ${DRIVERS_TOOLS}/.evergreen/auth_aws/creds.json) + SESSION_TOKEN=$(urlencode $SESSION_TOKEN) + export MONGODB_URI="mongodb://$USER:$PASS@localhost:27017/aws?authMechanism=MONGODB-AWS&authMechanismProperties=AWS_SESSION_TOKEN:$SESSION_TOKEN" + EOF + - command: shell.exec + type: test + params: + working_dir: "src" + script: | + ${PREPARE_SHELL} + ${PROJECT_DIRECTORY}/.evergreen/run-mongodb-aws-test.sh + + "run aws auth test with aws EC2 credentials": + - command: shell.exec + type: test + params: + working_dir: "src" + script: | + ${PREPARE_SHELL} + cd ${DRIVERS_TOOLS}/.evergreen/auth_aws + ${MONGODB_BINARIES}/mongo aws_e2e_ec2.js + - command: shell.exec + type: test + params: + working_dir: "src" + script: | + ${PREPARE_SHELL} + ${PROJECT_DIRECTORY}/.evergreen/run-mongodb-aws-test.sh + + "run aws auth test with aws credentials as environment variables": + - command: shell.exec + type: test + params: + working_dir: "src" + silent: true + script: | + cat < "${PROJECT_DIRECTORY}/prepare_mongodb_aws.sh" + export AWS_ACCESS_KEY_ID=${iam_auth_ecs_account} + export AWS_SECRET_ACCESS_KEY=${iam_auth_ecs_secret_access_key} + export MONGODB_URI="mongodb://localhost:27017/aws?authMechanism=MONGODB-AWS" + EOF + - command: shell.exec + type: test + params: + working_dir: "src" + script: | + ${PREPARE_SHELL} + ${PROJECT_DIRECTORY}/.evergreen/run-mongodb-aws-test.sh + + "run aws auth test with aws credentials and session token as environment variables": + - command: shell.exec + type: test + params: + working_dir: "src" + silent: true + script: | + cat <<'EOF' > "${PROJECT_DIRECTORY}/prepare_mongodb_aws.sh" + export AWS_ACCESS_KEY_ID=$(jq -r '.AccessKeyId' ${DRIVERS_TOOLS}/.evergreen/auth_aws/creds.json) + export AWS_SECRET_ACCESS_KEY=$(jq -r '.SecretAccessKey' ${DRIVERS_TOOLS}/.evergreen/auth_aws/creds.json) + export AWS_SESSION_TOKEN=$(jq -r '.SessionToken' ${DRIVERS_TOOLS}/.evergreen/auth_aws/creds.json) + export MONGODB_URI="mongodb://localhost:27017/aws?authMechanism=MONGODB-AWS" + EOF + - command: shell.exec + type: test + params: + working_dir: "src" + script: | + ${PREPARE_SHELL} + ${PROJECT_DIRECTORY}/.evergreen/run-mongodb-aws-test.sh + + "run aws ECS auth test": + - command: shell.exec + type: test + params: + working_dir: src + script: | + ${PREPARE_SHELL} + AUTH_AWS_DIR=${DRIVERS_TOOLS}/.evergreen/auth_aws + ECS_SRC_DIR=$AUTH_AWS_DIR/src + + # fix issue with `TestData` in SERVER-46340 + sed -i '1s+^+TestData = {};\n+' $AUTH_AWS_DIR/lib/ecs_hosted_test.js + + # pack up project directory to ssh it to the container + mkdir -p $ECS_SRC_DIR/.evergreen + cp $PROJECT_DIRECTORY/.evergreen/run-mongodb-aws-ecs-test.sh $ECS_SRC_DIR/.evergreen + tar -czf $ECS_SRC_DIR/src.tgz -C $PROJECT_DIRECTORY . + + cd $AUTH_AWS_DIR + cat < setup.js + const mongo_binaries = "$MONGODB_BINARIES"; + const project_dir = "$ECS_SRC_DIR"; + EOF + + cat setup.js + mongo --nodb setup.js aws_e2e_ecs.js + + "run-ocsp-test": + - command: shell.exec + type: test + params: + working_dir: "src" + script: | + ${PREPARE_SHELL} + + UNIFIED=${UNIFIED} \ + CA_FILE="$DRIVERS_TOOLS/.evergreen/ocsp/rsa/ca.pem" \ + OCSP_TLS_SHOULD_SUCCEED="${OCSP_TLS_SHOULD_SUCCEED}" \ + bash ${PROJECT_DIRECTORY}/.evergreen/run-ocsp-tests.sh + + "run-valid-ocsp-server": + - command: shell.exec + params: + script: | + cd ${DRIVERS_TOOLS}/.evergreen/ocsp + /opt/mongodbtoolchain/v3/bin/python3 -m venv ./venv + ./venv/bin/pip3 install -r ${DRIVERS_TOOLS}/.evergreen/ocsp/mock-ocsp-responder-requirements.txt + - command: shell.exec + params: + background: true + script: | + cd ${DRIVERS_TOOLS}/.evergreen/ocsp + nohup ./venv/bin/python3 ocsp_mock.py \ + --ca_file rsa/ca.pem \ + --ocsp_responder_cert rsa/ca.crt \ + --ocsp_responder_key rsa/ca.key \ + -p 8100 -v + + "run-revoked-ocsp-server": + - command: shell.exec + params: + script: | + cd ${DRIVERS_TOOLS}/.evergreen/ocsp + /opt/mongodbtoolchain/v3/bin/python3 -m venv ./venv + ./venv/bin/pip3 install -r ${DRIVERS_TOOLS}/.evergreen/ocsp/mock-ocsp-responder-requirements.txt + - command: shell.exec + params: + background: true + script: | + cd ${DRIVERS_TOOLS}/.evergreen/ocsp + nohup ./venv/bin/python3 ocsp_mock.py \ + --ca_file rsa/ca.pem \ + --ocsp_responder_cert rsa/ca.crt \ + --ocsp_responder_key rsa/ca.key \ + -p 8100 \ + -v \ + --fault revoked + + "upload test results": + # Upload the xunit-format test results. + - command: attach.xunit_results + params: + file: "src/xunit.xml" pre: - func: "fetch source" - func: "prepare resources" - # - func: "windows fix" + - func: "windows fix" - func: "fix absolute paths" - func: "make files executable" post: + - func: "upload test results" - func: "cleanup" + +ignore: + - '*.md' diff --git a/.evergreen/generate_evergreen_tasks.js b/.evergreen/generate_evergreen_tasks.js index e0190419b5b..db59a6174eb 100644 --- a/.evergreen/generate_evergreen_tasks.js +++ b/.evergreen/generate_evergreen_tasks.js @@ -1,137 +1,58 @@ -'use strict'; - const semver = require('semver'); const fs = require('fs'); const yaml = require('js-yaml'); const LATEST_EFFECTIVE_VERSION = '5.0'; -const MONGODB_VERSIONS = ['latest', '4.2', '4.0', '3.6', '3.4', '3.2', '3.0', '2.6']; -const NODE_VERSIONS = ['dubnium', 'carbon', 'boron', 'argon']; -const TOPOLOGIES = ['server', 'replica_set', 'sharded_cluster'].concat([ - 'server-unified', - 'replica_set-unified', - 'sharded_cluster-unified' -]); +const MONGODB_VERSIONS = ['latest', '4.4', '4.2', '4.0', '3.6', '3.4', '3.2', '3.0', '2.6']; +const NODE_VERSIONS = ['dubnium', 'erbium']; +const TOPOLOGIES = ['server', 'replica_set', 'sharded_cluster']; +const AWS_AUTH_VERSIONS = ['latest', '4.4']; +const OCSP_VERSIONS = ['latest', '4.4']; const OPERATING_SYSTEMS = [ - // Debian - { - name: 'debian71-test', - display_name: 'Debian 7.1', - run_on: 'debian71-test', - mongoVersion: '<4.0', - nodeVersions: ['argon', 'boron'] - }, - { - name: 'debian81-test', - display_name: 'Debian 8.1', - run_on: 'debian81-test', - mongoVersion: '>=3.4 <4.2' - }, - // TODO: once we know how to test debian 9.x - // { - // name: 'debian91-test', - // display_name: 'Debian 9.1', - // run_on: 'debian91-test', - // mongoVersion: '>=4.0' - // }, - // Amazon Linux - { - name: 'linux-64-amzn-test', - display_name: 'Amazon Linux (Enterprise)', - run_on: 'linux-64-amzn-test', - mongoVersion: '<4.0', - nodeVersions: ['argon', 'boron'] - }, - // macos { name: 'macos-1014', display_name: 'macOS 10.14', run_on: 'macos-1014', auth: false }, - // rhel { name: 'rhel70', display_name: 'RHEL 7.0', run_on: 'rhel70-small' }, - { - name: 'rhel71-power8-test', - display_name: 'RHEL 7.1 (POWER8)', - run_on: 'rhel71-power8-test', - mongoVersion: '>=3.2' - }, - //suse - { - name: 'suse12-x86-64-test', - display_name: 'SUSE 12 (x86_64)', - run_on: 'suse12-test', - mongoVersion: '>=3.2' - }, - // Ubuntu { name: 'ubuntu-14.04', display_name: 'Ubuntu 14.04', - run_on: 'ubuntu1404-test', + run_on: 'ubuntu1404-large', mongoVersion: '<4.2' }, { - name: 'ubuntu-16.04', - display_name: 'Ubuntu 16.04', - run_on: 'ubuntu1604-test', + name: 'ubuntu-18.04', + display_name: 'Ubuntu 18.04', + run_on: 'ubuntu1804-large', mongoVersion: '>=3.2', - clientEncryption: true, - nodeVersions: ['dubnium', 'carbon', 'boron'] + clientEncryption: true }, { - name: 'ubuntu1604-arm64-small', - display_name: 'Ubuntu 16.04 (ARM64)', - run_on: 'ubuntu1604-arm64-small', - mongoVersion: '>=3.4 <4.2' + name: 'windows-64-vs2015', + display_name: 'Windows (VS2015)', + run_on: 'windows-64-vs2015-large', + msvsVersion: 2015, + mongoVersion: '<4.4' }, { - name: 'ubuntu1604-power8-test', - display_name: 'Ubuntu 16.04 (POWER8)', - run_on: 'ubuntu1604-power8-test', - mongoVersion: '>=3.4 <4.2' - }, - { - name: 'ubuntu1804-arm64-test', - display_name: 'Ubuntu 18.04 (ARM64)', - run_on: 'ubuntu1804-arm64-test', - mongoVersion: '>=4.2' + name: 'windows-64-vs2017', + display_name: 'Windows (VS2017)', + run_on: 'windows-64-vs2017-large', + msvsVersion: 2017, + mongoVersion: '<4.4' } - - // reenable when these are actually running 7.2, or we release a 7.4 rpm - // { - // name: 'rhel72-zseries-test', - // display_name: 'RHEL 7.2 (zSeries)', - // run_on: 'rhel72-zseries-test', - // mongoVersion: '>=3.4' - // }, - - // Windows. reenable this when nvm supports windows, or we settle on an alternative tool - // { - // name: 'windows-64-vs2010-test', - // display_name: 'Windows (VS2010)', - // run_on: 'windows-64-vs2010-test' - // }, - // { - // name: 'windows-64-vs2013-test', - // display_name: 'Windows (VS2013)', - // run_on: 'windows-64-vs2013-test' - // }, - // { - // name: 'windows-64-vs2015-test', - // display_name: 'Windows (VS2015)', - // run_on: 'windows-64-vs2015-test' - // } ].map(osConfig => Object.assign( { mongoVersion: '>=2.6', - nodeVersion: 'argon', + nodeVersion: 'dubnium', auth: false }, osConfig @@ -139,76 +60,371 @@ const OPERATING_SYSTEMS = [ ); const TASKS = []; +const SINGLETON_TASKS = []; -function makeTask({ mongoVersion, topology }) { - let topologyForTest = topology; - let runTestsCommand = { func: 'run tests' }; - if (topology.indexOf('-unified') !== -1) { - topologyForTest = topology.split('-unified')[0]; - runTestsCommand = { func: 'run tests', vars: { UNIFIED: 1 } }; - } - +function makeTask({ mongoVersion, topology, tags = [] }) { return { name: `test-${mongoVersion}-${topology}`, - tags: [mongoVersion, topology], + tags: [mongoVersion, topology, ...tags], commands: [ - { - func: 'install dependencies' - }, + { func: 'install dependencies' }, { func: 'bootstrap mongo-orchestration', vars: { VERSION: mongoVersion, - TOPOLOGY: topologyForTest + TOPOLOGY: topology } }, - runTestsCommand + { func: 'run tests' } ] }; } +const BASE_TASKS = []; MONGODB_VERSIONS.forEach(mongoVersion => { - TOPOLOGIES.forEach(topology => { - TASKS.push(makeTask({ mongoVersion, topology })); - }); + TOPOLOGIES.forEach(topology => BASE_TASKS.push(makeTask({ mongoVersion, topology }))); }); -TASKS.push({ - name: 'test-atlas-connectivity', - tags: ['atlas-connect'], - commands: [ +// manually added tasks +Array.prototype.push.apply(TASKS, [ + { + name: 'test-atlas-connectivity', + tags: ['atlas-connect'], + commands: [{ func: 'install dependencies' }, { func: 'run atlas tests' }] + }, + { + name: 'test-atlas-data-lake', + commands: [ + { func: 'install dependencies' }, + { func: 'bootstrap mongohoused' }, + { func: 'run data lake tests' } + ] + }, + { + name: 'test-auth-kerberos', + tags: ['auth', 'kerberos'], + commands: [{ func: 'install dependencies' }, { func: 'run kerberos tests' }] + }, + { + name: 'test-auth-ldap', + tags: ['auth', 'ldap'], + commands: [{ func: 'install dependencies' }, { func: 'run ldap tests' }] + }, + { + name: 'test-tls-support', + tags: ['tls-support'], + commands: [ + { func: 'install dependencies' }, + { + func: 'bootstrap mongo-orchestration', + vars: { + SSL: 'ssl', + VERSION: 'latest', + TOPOLOGY: 'server' + } + }, + { func: 'run tls tests' } + ] + }, + { + name: 'test-ocsp-valid-cert-server-staples', + tags: ['ocsp'], + commands: [ + { func: 'run-valid-ocsp-server' }, + { func: 'install dependencies' }, + { + func: 'bootstrap mongo-orchestration', + vars: { + ORCHESTRATION_FILE: 'rsa-basic-tls-ocsp-mustStaple.json', + VERSION: 'latest', + TOPOLOGY: 'server' + } + }, + { func: 'run-ocsp-test', vars: { OCSP_TLS_SHOULD_SUCCEED: 1 } } + ] + }, + { + name: 'test-ocsp-invalid-cert-server-staples', + tags: ['ocsp'], + commands: [ + { func: 'run-revoked-ocsp-server' }, + { func: 'install dependencies' }, + { + func: 'bootstrap mongo-orchestration', + vars: { + ORCHESTRATION_FILE: 'rsa-basic-tls-ocsp-mustStaple.json', + VERSION: 'latest', + TOPOLOGY: 'server' + } + }, + { func: 'run-ocsp-test', vars: { OCSP_TLS_SHOULD_SUCCEED: 0 } } + ] + }, + { + name: 'test-ocsp-valid-cert-server-does-not-staple', + tags: ['ocsp'], + commands: [ + { func: 'run-valid-ocsp-server' }, + { func: 'install dependencies' }, + { + func: 'bootstrap mongo-orchestration', + vars: { + ORCHESTRATION_FILE: 'rsa-basic-tls-ocsp-disableStapling.json', + VERSION: 'latest', + TOPOLOGY: 'server' + } + }, + { func: 'run-ocsp-test', vars: { OCSP_TLS_SHOULD_SUCCEED: 1 } } + ] + }, + { + name: 'test-ocsp-invalid-cert-server-does-not-staple', + tags: ['ocsp'], + commands: [ + { func: 'run-revoked-ocsp-server' }, + { func: 'install dependencies' }, + { + func: 'bootstrap mongo-orchestration', + vars: { + ORCHESTRATION_FILE: 'rsa-basic-tls-ocsp-disableStapling.json', + VERSION: 'latest', + TOPOLOGY: 'server' + } + }, + { func: 'run-ocsp-test', vars: { OCSP_TLS_SHOULD_SUCCEED: 0 } } + ] + }, + { + name: 'test-ocsp-soft-fail', + tags: ['ocsp'], + commands: [ + { func: 'install dependencies' }, + { + func: 'bootstrap mongo-orchestration', + vars: { + ORCHESTRATION_FILE: 'rsa-basic-tls-ocsp-disableStapling.json', + VERSION: 'latest', + TOPOLOGY: 'server' + } + }, + { func: 'run-ocsp-test', vars: { OCSP_TLS_SHOULD_SUCCEED: 1 } } + ] + }, + { + name: 'test-ocsp-malicious-invalid-cert-mustStaple-server-does-not-staple', + tags: ['ocsp'], + commands: [ + { func: 'run-revoked-ocsp-server' }, + { func: 'install dependencies' }, + { + func: 'bootstrap mongo-orchestration', + vars: { + ORCHESTRATION_FILE: 'rsa-basic-tls-ocsp-mustStaple-disableStapling.json', + VERSION: 'latest', + TOPOLOGY: 'server' + } + }, + { func: 'run-ocsp-test', vars: { OCSP_TLS_SHOULD_SUCCEED: 0 } } + ] + }, + { + name: 'test-ocsp-malicious-no-responder-mustStaple-server-does-not-staple', + tags: ['ocsp'], + commands: [ + { func: 'install dependencies' }, + { + func: 'bootstrap mongo-orchestration', + vars: { + ORCHESTRATION_FILE: 'rsa-basic-tls-ocsp-mustStaple-disableStapling.json', + VERSION: 'latest', + TOPOLOGY: 'server' + } + }, + { func: 'run-ocsp-test', vars: { OCSP_TLS_SHOULD_SUCCEED: 0 } } + ] + } +]); + +OCSP_VERSIONS.forEach(VERSION => { + // manually added tasks + Array.prototype.push.apply(TASKS, [ { - func: 'install dependencies' + name: `test-${VERSION}-ocsp-valid-cert-server-staples`, + tags: ['ocsp'], + commands: [ + { func: `run-valid-ocsp-server` }, + { func: 'install dependencies' }, + { + func: 'bootstrap mongo-orchestration', + vars: { + ORCHESTRATION_FILE: 'rsa-basic-tls-ocsp-mustStaple.json', + VERSION: VERSION, + TOPOLOGY: 'server' + } + }, + { func: 'run-ocsp-test', vars: { OCSP_TLS_SHOULD_SUCCEED: 1 } } + ] }, { - func: 'run atlas tests', - vars: { - VERSION: 'latest' - } + name: `test-${VERSION}-ocsp-invalid-cert-server-staples`, + tags: ['ocsp'], + commands: [ + { func: 'run-revoked-ocsp-server' }, + { func: 'install dependencies' }, + { + func: 'bootstrap mongo-orchestration', + vars: { + ORCHESTRATION_FILE: 'rsa-basic-tls-ocsp-mustStaple.json', + VERSION: VERSION, + TOPOLOGY: 'server' + } + }, + { func: 'run-ocsp-test', vars: { OCSP_TLS_SHOULD_SUCCEED: 0 } } + ] + }, + { + name: `test-${VERSION}-ocsp-valid-cert-server-does-not-staple`, + tags: ['ocsp'], + commands: [ + { func: 'run-valid-ocsp-server' }, + { func: 'install dependencies' }, + { + func: 'bootstrap mongo-orchestration', + vars: { + ORCHESTRATION_FILE: 'rsa-basic-tls-ocsp-disableStapling.json', + VERSION: VERSION, + TOPOLOGY: 'server' + } + }, + { func: 'run-ocsp-test', vars: { OCSP_TLS_SHOULD_SUCCEED: 1 } } + ] + }, + { + name: `test-${VERSION}-ocsp-invalid-cert-server-does-not-staple`, + tags: ['ocsp'], + commands: [ + { func: 'run-revoked-ocsp-server' }, + { func: 'install dependencies' }, + { + func: 'bootstrap mongo-orchestration', + vars: { + ORCHESTRATION_FILE: 'rsa-basic-tls-ocsp-disableStapling.json', + VERSION: VERSION, + TOPOLOGY: 'server' + } + }, + { func: 'run-ocsp-test', vars: { OCSP_TLS_SHOULD_SUCCEED: 0 } } + ] + }, + { + name: `test-${VERSION}-ocsp-soft-fail`, + tags: ['ocsp'], + commands: [ + { func: 'install dependencies' }, + { + func: 'bootstrap mongo-orchestration', + vars: { + ORCHESTRATION_FILE: 'rsa-basic-tls-ocsp-disableStapling.json', + VERSION: VERSION, + TOPOLOGY: 'server' + } + }, + { func: 'run-ocsp-test', vars: { OCSP_TLS_SHOULD_SUCCEED: 1 } } + ] + }, + { + name: `test-${VERSION}-ocsp-malicious-invalid-cert-mustStaple-server-does-not-staple`, + tags: ['ocsp'], + commands: [ + { func: 'run-revoked-ocsp-server' }, + { func: 'install dependencies' }, + { + func: 'bootstrap mongo-orchestration', + vars: { + ORCHESTRATION_FILE: 'rsa-basic-tls-ocsp-mustStaple-disableStapling.json', + VERSION: VERSION, + TOPOLOGY: 'server' + } + }, + { func: 'run-ocsp-test', vars: { OCSP_TLS_SHOULD_SUCCEED: 0 } } + ] + }, + { + name: `test-${VERSION}-ocsp-malicious-no-responder-mustStaple-server-does-not-staple`, + tags: ['ocsp'], + commands: [ + { func: 'install dependencies' }, + { + func: 'bootstrap mongo-orchestration', + vars: { + ORCHESTRATION_FILE: 'rsa-basic-tls-ocsp-mustStaple-disableStapling.json', + VERSION: VERSION, + TOPOLOGY: 'server' + } + }, + { func: 'run-ocsp-test', vars: { OCSP_TLS_SHOULD_SUCCEED: 0 } } + ] } - ] + ]); +}); + +const AWS_AUTH_TASKS = []; + +AWS_AUTH_VERSIONS.forEach(VERSION => { + const name = `aws-${VERSION}-auth-test`; + AWS_AUTH_TASKS.push(name); + TASKS.push({ + name: name, + commands: [ + { func: 'install dependencies' }, + { + func: 'bootstrap mongo-orchestration', + vars: { + VERSION: VERSION, + AUTH: 'auth', + ORCHESTRATION_FILE: 'auth-aws.json', + TOPOLOGY: 'server' + } + }, + { func: 'add aws auth variables to file' }, + { func: 'run aws auth test with regular aws credentials' }, + { func: 'run aws auth test with assume role credentials' }, + { func: 'run aws auth test with aws EC2 credentials' }, + { func: 'run aws auth test with aws credentials as environment variables' }, + { func: 'run aws auth test with aws credentials and session token as environment variables' }, + { func: 'run aws ECS auth test' } + ] + }); }); const BUILD_VARIANTS = []; const getTaskList = (() => { const memo = {}; - return function(mongoVersion) { - const key = mongoVersion; + return function (mongoVersion, onlyBaseTasks = false) { + const key = mongoVersion + (onlyBaseTasks ? 'b' : ''); if (memo[key]) { return memo[key]; } + const taskList = onlyBaseTasks ? BASE_TASKS : BASE_TASKS.concat(TASKS); + const ret = taskList + .filter(task => { + const tasksWithVars = task.commands.filter(task => !!task.vars); + if (task.name.match(/^aws/)) return false; - const ret = TASKS.filter(task => { - const { VERSION } = task.commands.filter(task => !!task.vars)[0].vars; + if (!tasksWithVars.length) { + return true; + } - if (VERSION === 'latest') { - return semver.satisfies(semver.coerce(LATEST_EFFECTIVE_VERSION), mongoVersion); - } + const { VERSION } = task.commands.filter(task => !!task.vars)[0].vars; + if (VERSION === 'latest') { + return semver.satisfies(semver.coerce(LATEST_EFFECTIVE_VERSION), mongoVersion); + } - return semver.satisfies(semver.coerce(VERSION), mongoVersion); - }).map(x => x.name); + return semver.satisfies(semver.coerce(VERSION), mongoVersion); + }) + .map(x => x.name); memo[key] = ret; return ret; @@ -222,10 +438,11 @@ OPERATING_SYSTEMS.forEach( run_on, mongoVersion = '>=2.6', nodeVersions = NODE_VERSIONS, - clientEncryption + clientEncryption, + msvsVersion }) => { const testedNodeVersions = NODE_VERSIONS.filter(version => nodeVersions.includes(version)); - const tasks = getTaskList(mongoVersion); + const tasks = getTaskList(mongoVersion, !!msvsVersion); testedNodeVersions.forEach(NODE_LTS_NAME => { const nodeLtsDisplayName = `Node ${NODE_LTS_NAME[0].toUpperCase()}${NODE_LTS_NAME.substr(1)}`; @@ -236,15 +453,73 @@ OPERATING_SYSTEMS.forEach( if (clientEncryption) { expansions.CLIENT_ENCRYPTION = true; } + if (msvsVersion) { + expansions.MSVS_VERSION = msvsVersion; + } BUILD_VARIANTS.push({ name, display_name, run_on, expansions, tasks }); }); } ); -const fileData = yaml.safeLoad(fs.readFileSync(`${__dirname}/config.yml.in`, 'utf8')); +// singleton build variant for linting +SINGLETON_TASKS.push({ + name: 'run-checks', + tags: ['run-checks'], + commands: [ + { + func: 'install dependencies', + vars: { + NODE_LTS_NAME: 'erbium' + } + }, + { func: 'run checks' } + ] +}); + +BUILD_VARIANTS.push({ + name: 'lint', + display_name: 'lint', + run_on: 'rhel70', + tasks: ['run-checks'] +}); -fileData.tasks = (fileData.tasks || []).concat(TASKS); +// singleton build variant for mongosh integration tests +SINGLETON_TASKS.push({ + name: 'run-mongosh-integration-tests', + tags: ['run-mongosh-integration-tests'], + exec_timeout_secs: 3600, + commands: [ + { + func: 'install dependencies', + vars: { + NODE_LTS_NAME: 'fermium' + } + }, + { func: 'run mongosh integration tests' } + ] +}); + +BUILD_VARIANTS.push({ + name: 'mongosh_integration_tests', + display_name: 'mongosh integration tests', + run_on: 'ubuntu1804-test', + tasks: ['run-mongosh-integration-tests'] +}); + +// special case for MONGODB-AWS authentication +BUILD_VARIANTS.push({ + name: 'ubuntu1804-test-mongodb-aws', + display_name: 'MONGODB-AWS Auth test', + run_on: 'ubuntu1804-test', + expansions: { + NODE_LTS_NAME: 'dubnium' + }, + tasks: AWS_AUTH_TASKS +}); + +const fileData = yaml.safeLoad(fs.readFileSync(`${__dirname}/config.yml.in`, 'utf8')); +fileData.tasks = (fileData.tasks || []).concat(BASE_TASKS).concat(TASKS).concat(SINGLETON_TASKS); fileData.buildvariants = (fileData.buildvariants || []).concat(BUILD_VARIANTS); fs.writeFileSync(`${__dirname}/config.yml`, yaml.safeDump(fileData, { lineWidth: 120 }), 'utf8'); diff --git a/.evergreen/install-dependencies.sh b/.evergreen/install-dependencies.sh index acfd7f2fe11..4c4f4f65d82 100644 --- a/.evergreen/install-dependencies.sh +++ b/.evergreen/install-dependencies.sh @@ -2,35 +2,104 @@ # set -o xtrace # Write all commands first to stderr set -o errexit # Exit the script with error if any of the commands fail +NVM_WINDOWS_URL="https://github.com/coreybutler/nvm-windows/releases/download/1.1.7/nvm-noinstall.zip" +NVM_URL="https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh" + NODE_LTS_NAME=${NODE_LTS_NAME:-carbon} +MSVS_VERSION=${MSVS_VERSION:-2017} NODE_ARTIFACTS_PATH="${PROJECT_DIRECTORY}/node-artifacts" NPM_CACHE_DIR="${NODE_ARTIFACTS_PATH}/npm" NPM_TMP_DIR="${NODE_ARTIFACTS_PATH}/tmp" # this needs to be explicitly exported for the nvm install below export NVM_DIR="${NODE_ARTIFACTS_PATH}/nvm" +export XDG_CONFIG_HOME=${NODE_ARTIFACTS_PATH} # create node artifacts path if needed mkdir -p ${NODE_ARTIFACTS_PATH} mkdir -p ${NPM_CACHE_DIR} mkdir -p "${NPM_TMP_DIR}" -# install Node.js -curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash -[ -s "${NVM_DIR}/nvm.sh" ] && \. "${NVM_DIR}/nvm.sh" -nvm install --lts=${NODE_LTS_NAME} +case $NODE_LTS_NAME in + "argon") + VERSION=4 + ;; + "boron") + VERSION=6 + ;; + "carbon") + VERSION=8 + ;; + "dubnium") + VERSION=10 + ;; + "erbium") + VERSION=12 + ;; + "fermium") + VERSION=14 + ;; + *) + echo "Unsupported Node LTS version $1" + exit 1 + ;; +esac +NODE_VERSION=$(curl --retry 8 --retry-delay 5 --max-time 50 -s -o- \ + https://nodejs.org/download/release/latest-v${VERSION}.x/SHASUMS256.txt \ +| head -n 1 | awk '{print $2};' | cut -d- -f2) +export NODE_VERSION=${NODE_VERSION:1} + +# output node version to expansions file for use in subsequent scripts +cat < deps-expansion.yml + NODE_VERSION: "$NODE_VERSION" +EOT + +# install Node.js on Windows +if [[ "$OS" == "Windows_NT" ]]; then + # Delete pre-existing node to avoid version conflicts + rm -rf "/cygdrive/c/Program Files/nodejs" + + export NVM_HOME=`cygpath -w "$NVM_DIR"` + export NVM_SYMLINK=`cygpath -w "$NODE_ARTIFACTS_PATH/bin"` + export NVM_ARTIFACTS_PATH=`cygpath -w "$NODE_ARTIFACTS_PATH/bin"` + export PATH=`cygpath $NVM_SYMLINK`:`cygpath $NVM_HOME`:$PATH + + curl -L $NVM_WINDOWS_URL -o nvm.zip + unzip -d $NVM_DIR nvm.zip + rm nvm.zip + + chmod 777 $NVM_DIR + chmod -R a+rx $NVM_DIR + + cat < $NVM_DIR/settings.txt +root: $NVM_HOME +path: $NVM_SYMLINK +EOT + nvm install $NODE_VERSION + nvm use $NODE_VERSION + which node || echo "node not found, PATH=$PATH" + which npm || echo "npm not found, PATH=$PATH" + npm config set msvs_version ${MSVS_VERSION} + npm config set scripts-prepend-node-path true + +# install Node.js on Linux/MacOS +else + curl -o- $NVM_URL | bash + [ -s "${NVM_DIR}/nvm.sh" ] && \. "${NVM_DIR}/nvm.sh" + nvm install --no-progress $NODE_VERSION -# setup npm cache in a local directory -cat < .npmrc + # setup npm cache in a local directory + cat < .npmrc devdir=${NPM_CACHE_DIR}/.node-gyp init-module=${NPM_CACHE_DIR}/.npm-init.js cache=${NPM_CACHE_DIR} tmp=${NPM_TMP_DIR} registry=https://registry.npmjs.org EOT +fi # NOTE: registry was overridden to not use artifactory, remove the `registry` line when # BUILD-6774 is resolved. # install node dependencies -npm install +npm install --unsafe-perm diff --git a/.evergreen/run-atlas-tests.sh b/.evergreen/run-atlas-tests.sh index ab2d163c2bf..e3920d7229e 100644 --- a/.evergreen/run-atlas-tests.sh +++ b/.evergreen/run-atlas-tests.sh @@ -7,4 +7,4 @@ NODE_ARTIFACTS_PATH="${PROJECT_DIRECTORY}/node-artifacts" export NVM_DIR="${NODE_ARTIFACTS_PATH}/nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" -ATLAS_REPL="$ATLAS_REPL" ATLAS_SHRD="$ATLAS_SHRD" ATLAS_FREE="$ATLAS_FREE" ATLAS_TLS11="$ATLAS_TLS11" ATLAS_TLS12="$ATLAS_TLS12" npm run atlas +npm run check:atlas diff --git a/.evergreen/run-checks.sh b/.evergreen/run-checks.sh new file mode 100644 index 00000000000..ff755a4d8ee --- /dev/null +++ b/.evergreen/run-checks.sh @@ -0,0 +1,9 @@ +#!/bin/bash +set -o errexit # Exit the script with error if any of the commands fail + +export PROJECT_DIRECTORY="$(pwd)" +NODE_ARTIFACTS_PATH="${PROJECT_DIRECTORY}/node-artifacts" +export NVM_DIR="${NODE_ARTIFACTS_PATH}/nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" + +npm run check:lint diff --git a/.evergreen/run-data-lake-tests.sh b/.evergreen/run-data-lake-tests.sh new file mode 100644 index 00000000000..8db7e23f1c3 --- /dev/null +++ b/.evergreen/run-data-lake-tests.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +set -o errexit # Exit the script with error if any of the commands fail + +export PROJECT_DIRECTORY="$(pwd)" +NODE_ARTIFACTS_PATH="${PROJECT_DIRECTORY}/node-artifacts" +export NVM_DIR="${NODE_ARTIFACTS_PATH}/nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" + +echo $MONGODB_URI; +npm run check:adl diff --git a/.evergreen/run-kerberos-tests.sh b/.evergreen/run-kerberos-tests.sh new file mode 100644 index 00000000000..665d520efcb --- /dev/null +++ b/.evergreen/run-kerberos-tests.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +set -o errexit # Exit the script with error if any of the commands fail + +export PROJECT_DIRECTORY="$(pwd)" +NODE_ARTIFACTS_PATH="${PROJECT_DIRECTORY}/node-artifacts" +export NVM_DIR="${NODE_ARTIFACTS_PATH}/nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" + +# set up keytab +mkdir -p "$(pwd)/.evergreen" +touch "$(pwd)/.evergreen/krb5.conf.empty" +export KRB5_CONFIG="$(pwd)/.evergreen/krb5.conf.empty" +echo "Writing keytab" +# DON'T PRINT KEYTAB TO STDOUT +set +o verbose +if [[ "$OSTYPE" == "darwin"* ]]; then + echo ${KRB5_KEYTAB} | base64 -D > "$(pwd)/.evergreen/drivers.keytab" +else + echo ${KRB5_KEYTAB} | base64 -d > "$(pwd)/.evergreen/drivers.keytab" +fi +echo "Running kinit" +kinit -k -t "$(pwd)/.evergreen/drivers.keytab" -p ${KRB5_PRINCIPAL} + +npm install kerberos +npm run check:kerberos + +# destroy ticket +kdestroy diff --git a/.evergreen/run-ldap-tests.sh b/.evergreen/run-ldap-tests.sh new file mode 100644 index 00000000000..88dd1b19e99 --- /dev/null +++ b/.evergreen/run-ldap-tests.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +set -o errexit # Exit the script with error if any of the commands fail + +export PROJECT_DIRECTORY="$(pwd)" +NODE_ARTIFACTS_PATH="${PROJECT_DIRECTORY}/node-artifacts" +export NVM_DIR="${NODE_ARTIFACTS_PATH}/nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" + +npm run check:ldap diff --git a/.evergreen/run-mongodb-aws-ecs-test.sh b/.evergreen/run-mongodb-aws-ecs-test.sh new file mode 100755 index 00000000000..54989bfe420 --- /dev/null +++ b/.evergreen/run-mongodb-aws-ecs-test.sh @@ -0,0 +1,20 @@ +#!/bin/bash +set -o xtrace # Write all commands first to stderr +set -o errexit # Exit the script with error if any of the commands fail + +MONGODB_URI="$1" +PROJECT_DIRECTORY="$(pwd)/src" + +# untar packed archive +cd $PROJECT_DIRECTORY +tar -xzf src.tgz . + +# load node.js +set +x +export NVM_DIR="${PROJECT_DIRECTORY}/node-artifacts/nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" +set -x + +# run the tests +npm install aws4 +MONGODB_URI=$MONGODB_URI MONGODB_UNIFIED_TOPOLOGY=1 npx mocha test/functional/mongodb_aws.test.js diff --git a/.evergreen/run-mongodb-aws-test.sh b/.evergreen/run-mongodb-aws-test.sh new file mode 100755 index 00000000000..4a3dbcb5a38 --- /dev/null +++ b/.evergreen/run-mongodb-aws-test.sh @@ -0,0 +1,25 @@ +#!/bin/bash +# set -o xtrace # Write all commands first to stderr +set -o errexit # Exit the script with error if any of the commands fail + +MONGODB_URI=${MONGODB_URI:-} + +# ensure no secrets are printed in log files +set +x + +# load node.js environment +export NVM_DIR="${PROJECT_DIRECTORY}/node-artifacts/nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" + +# the default connection string, may be overridden by the environment script +export MONGODB_URI="mongodb://localhost:27017/aws?authMechanism=MONGODB-AWS" + +# load the script +shopt -s expand_aliases # needed for `urlencode` alias +[ -s "$PROJECT_DIRECTORY/prepare_mongodb_aws.sh" ] && source "$PROJECT_DIRECTORY/prepare_mongodb_aws.sh" + +# revert to show test output +set -x + +npm install aws4 +MONGODB_UNIFIED_TOPOLOGY=1 npx mocha test/functional/mongodb_aws.test.js diff --git a/.evergreen/run-mongosh-integration-tests.sh b/.evergreen/run-mongosh-integration-tests.sh new file mode 100644 index 00000000000..60d0eb75953 --- /dev/null +++ b/.evergreen/run-mongosh-integration-tests.sh @@ -0,0 +1,16 @@ +#!/bin/bash +set -o errexit # Exit the script with error if any of the commands fail +set -o xtrace # Write all commands first to stderr + +export PROJECT_DIRECTORY="$(pwd)" +NODE_ARTIFACTS_PATH="${PROJECT_DIRECTORY}/node-artifacts" +export NVM_DIR="${NODE_ARTIFACTS_PATH}/nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" + +npm pack | tee npm-pack.log +export TARBALL_FILENAME="$(tail -n1 npm-pack.log)" +cd /tmp +git clone --depth=10 https://github.com/mongodb-js/mongosh.git +cd mongosh +export REPLACE_PACKAGE="mongodb:${PROJECT_DIRECTORY}/${TARBALL_FILENAME}" +npm run test-nodedriver diff --git a/.evergreen/run-ocsp-tests.sh b/.evergreen/run-ocsp-tests.sh new file mode 100644 index 00000000000..49178d194da --- /dev/null +++ b/.evergreen/run-ocsp-tests.sh @@ -0,0 +1,21 @@ +#!/bin/bash +set -o xtrace +set -o errexit + +UNIFIED=${UNIFIED:-} + +# load node.js environment +export NVM_DIR="${PROJECT_DIRECTORY}/node-artifacts/nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" + +# $PYTHON_BINARY -m virtualenv --never-download --no-wheel ocsptest +# . ocsptest/bin/activate +# trap "deactivate; rm -rf ocsptest" EXIT HUP +# pip install pyopenssl requests service_identity +# PYTHON=python + +# NOTE: `--opts {}` is used below to revert mocha to normal behavior (without mongodb specific plugins) +MONGODB_UNIFIED_TOPOLOGY=${UNIFIED} \ +OCSP_TLS_SHOULD_SUCCEED=${OCSP_TLS_SHOULD_SUCCEED} \ +CA_FILE=${CA_FILE} \ +npm run check:ocsp diff --git a/.evergreen/run-tests.sh b/.evergreen/run-tests.sh index d031023101a..dbb756b5599 100755 --- a/.evergreen/run-tests.sh +++ b/.evergreen/run-tests.sh @@ -8,19 +8,45 @@ set -o errexit # Exit the script with error if any of the commands fail # UNIFIED Set to enable the Unified SDAM topology for the node driver # MONGODB_URI Set the suggested connection MONGODB_URI (including credentials and topology info) # MARCH Machine Architecture. Defaults to lowercase uname -m +# TEST_NPM_SCRIPT Script to npm run. Defaults to "check:test" +# SKIP_DEPS Skip installing dependencies +# NO_EXIT Don't exit early from tests that leak resources AUTH=${AUTH:-noauth} -SSL=${SSL:-nossl} UNIFIED=${UNIFIED:-} MONGODB_URI=${MONGODB_URI:-} +TEST_NPM_SCRIPT=${TEST_NPM_SCRIPT:-check:test} +if [[ -z "${NO_EXIT}" ]]; then + TEST_NPM_SCRIPT="$TEST_NPM_SCRIPT -- --exit" +fi + +# ssl setup +SSL=${SSL:-nossl} +if [ "$SSL" != "nossl" ]; then + export SSL_KEY_FILE="$DRIVERS_TOOLS/.evergreen/x509gen/client.pem" + export SSL_CA_FILE="$DRIVERS_TOOLS/.evergreen/x509gen/ca.pem" +fi # run tests echo "Running $AUTH tests over $SSL, connecting to $MONGODB_URI" -export PATH="/opt/mongodbtoolchain/v2/bin:$PATH" -NODE_ARTIFACTS_PATH="${PROJECT_DIRECTORY}/node-artifacts" -export NVM_DIR="${NODE_ARTIFACTS_PATH}/nvm" -[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" +if [[ -z "${SKIP_DEPS}" ]]; then + source "${PROJECT_DIRECTORY}/.evergreen/install-dependencies.sh" +else + export PATH="/opt/mongodbtoolchain/v2/bin:$PATH" + NODE_ARTIFACTS_PATH="${PROJECT_DIRECTORY}/node-artifacts" + export NVM_DIR="${NODE_ARTIFACTS_PATH}/nvm" + if [[ "$OS" == "Windows_NT" ]]; then + export NVM_HOME=`cygpath -m -a "$NVM_DIR"` + export NVM_SYMLINK=`cygpath -m -a "$NODE_ARTIFACTS_PATH/bin"` + export NVM_ARTIFACTS_PATH=`cygpath -m -a "$NODE_ARTIFACTS_PATH/bin"` + export PATH=`cygpath $NVM_SYMLINK`:`cygpath $NVM_HOME`:$PATH + echo "updated path on windows PATH=$PATH" + else + [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" + fi + echo "initializing NVM, NVM_DIR=$NVM_DIR" +fi # only run FLE tets on hosts we explicitly choose to test on if [[ -z "${CLIENT_ENCRYPTION}" ]]; then @@ -30,4 +56,4 @@ else npm install mongodb-client-encryption fi -MONGODB_UNIFIED_TOPOLOGY=${UNIFIED} MONGODB_URI=${MONGODB_URI} npm test +MONGODB_UNIFIED_TOPOLOGY=${UNIFIED} MONGODB_URI=${MONGODB_URI} npm run ${TEST_NPM_SCRIPT} diff --git a/.evergreen/run-tls-tests.sh b/.evergreen/run-tls-tests.sh new file mode 100644 index 00000000000..c7c5ed64806 --- /dev/null +++ b/.evergreen/run-tls-tests.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +set -o errexit # Exit the script with error if any of the commands fail + +export PROJECT_DIRECTORY="$(pwd)" +NODE_ARTIFACTS_PATH="${PROJECT_DIRECTORY}/node-artifacts" +export NVM_DIR="${NODE_ARTIFACTS_PATH}/nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" +export SSL_KEY_FILE="$DRIVERS_TOOLS/.evergreen/x509gen/client.pem" +export SSL_CA_FILE="$DRIVERS_TOOLS/.evergreen/x509gen/ca.pem" + +npm run check:tls diff --git a/.gitignore b/.gitignore index 836bde681d4..bfef1ff9daf 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,10 @@ pids *.dat *.png test*.* +output + +types +docs/gen # Directory for instrumented libs generated by jscoverage/JSCover lib-cov @@ -23,12 +27,13 @@ t.js .DS_Store test/benchmarks/performance-data .nyc_output/ -typings/ -jsconfig.json manual_tests/ docs/build docs/Makefile +# xunit test output for CI +xunit.xml + # Directory for dbs db @@ -46,4 +51,9 @@ build/Release # see https://npmjs.org/doc/faq.html#Should-I-check-my-node_modules-folder-into-git node_modules yarn.lock +lib/ +*.tgz +*.d.ts +.vscode +output \ No newline at end of file diff --git a/.mocharc.json b/.mocharc.json new file mode 100644 index 00000000000..58809b203d7 --- /dev/null +++ b/.mocharc.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/mocharc.json", + "extension": [ + "js", + "ts" + ], + "require": [ + "ts-node/register", + "source-map-support/register" + ], + "file": "test/tools/runner", + "ui": "test/tools/runner/metadata_ui.js", + "recursive": true, + "timeout": 60000, + "reporter": "test/tools/reporter/mongodb_reporter.js", + "color": true +} diff --git a/.npmignore b/.npmignore index 1eeb33679e1..2a519a24181 100644 --- a/.npmignore +++ b/.npmignore @@ -30,12 +30,15 @@ performance/ public/ .coverage_data/ .coveralls.yml -.eslintrc +.eslintrc.json docs/public .nyc_output/ -typings/ jsconfig.json manual_tests/ external-libs/bson/build/ external-libs/bson/build/.wafpickle-7 + +src/ +*.json +Makefile diff --git a/.nycrc.json b/.nycrc.json new file mode 100644 index 00000000000..3e8a049ea12 --- /dev/null +++ b/.nycrc.json @@ -0,0 +1,5 @@ +{ + "extends": "@istanbuljs/nyc-config-typescript", + "include": ["src/**/*.ts"], + "reporter": ["lcovonly", "text-summary"] +} diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 00000000000..0f817560533 --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,7 @@ +{ + "singleQuote": true, + "tabWidth": 2, + "printWidth": 100, + "arrowParens": "avoid", + "trailingComma": "none" +} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 97348674a17..00000000000 --- a/.travis.yml +++ /dev/null @@ -1,137 +0,0 @@ -dist: xenial -language: node_js - -branches: - only: - - master - - next - -before_install: - # we have to intstall mongo-orchestration ourselves to get around permissions issues in subshells - - sudo pip install --upgrade 'git+git://github.com/mongodb/mongo-orchestration@master' - - sudo apt-get install -y libsnmp30 - - - git clone --depth 1 https://github.com/mongodb-labs/drivers-evergreen-tools - - export DRIVERS_TOOLS="${PWD}/drivers-evergreen-tools" - - export MONGO_ORCHESTRATION_HOME="$DRIVERS_TOOLS/.evergreen/orchestration" - - export MONGODB_BINARIES="$DRIVERS_TOOLS/mongodb/bin" - - # disable ipv6 since its not supported on travis - - "find ${MONGO_ORCHESTRATION_HOME} -name \"*.json\" -exec sed -i 's/\"ipv6\": true/\"ipv6\": false/g' {} \\;" - - "find ${MONGO_ORCHESTRATION_HOME} -name \"*.json\" -exec sed -i 's/,::1//g' {} \\;" - - "find ${MONGO_ORCHESTRATION_HOME} -name \"*.json\" -exec sed -i 's/::1,//g' {} \\;" - - - "echo '{ \"releases\": { \"default\": \"'${MONGODB_BINARIES}'\" } }' > $MONGO_ORCHESTRATION_HOME/orchestration.config" - - export TOPOLOGY=${MONGODB_ENVIRONMENT} - - bash ${DRIVERS_TOOLS}/.evergreen/run-orchestration.sh || tail -n +1 ${MONGO_ORCHESTRATION_HOME}/*.log - - "export MONGODB_URI=$(grep -oP '(?<=MONGODB_URI: \")[^\"]*' mo-expansion.yml)" - -after_failure: - - tail -n +1 ${MONGO_ORCHESTRATION_HOME}/*.log - -jobs: - include: - - stage: standalone - node_js: 6 - env: - - MONGODB_VERSION=2.6 - - MONGODB_ENVIRONMENT=server - - stage: standalone - node_js: 6 - env: - - MONGODB_VERSION=3.0 - - MONGODB_ENVIRONMENT=server - - stage: standalone - node_js: 6 - env: - - MONGODB_VERSION=3.2 - - MONGODB_ENVIRONMENT=server - - stage: standalone - node_js: 6 - env: - - MONGODB_VERSION=3.4 - - MONGODB_ENVIRONMENT=server - - stage: standalone - node_js: 6 - env: - - MONGODB_VERSION=3.6 - - MONGODB_ENVIRONMENT=server - - stage: standalone - node_js: 6 - env: - - MONGODB_VERSION=4.0 - - MONGODB_ENVIRONMENT=server - - - stage: standalone - node_js: 6 - env: - - MONGODB_VERSION=4.0 - - MONGODB_ENVIRONMENT=server - - stage: standalone - node_js: 8 - env: - - MONGODB_VERSION=4.0 - - MONGODB_ENVIRONMENT=server - - stage: standalone - node_js: 10 - env: - - MONGODB_VERSION=4.0 - - MONGODB_ENVIRONMENT=server - - stage: standalone - node_js: 12 - env: - - MONGODB_VERSION=4.0 - - MONGODB_ENVIRONMENT=server - - - stage: replicaset - node_js: 6 - env: - - MONGODB_VERSION=4.0 - - MONGODB_ENVIRONMENT=replica_set - - stage: replicaset - node_js: 6 - env: - - MONGODB_VERSION=4.2 - - MONGODB_ENVIRONMENT=replica_set - - stage: sharded - node_js: 6 - env: - - MONGODB_VERSION=4.0 - - MONGODB_ENVIRONMENT=sharded_cluster - - stage: sharded - node_js: 6 - env: - - MONGODB_VERSION=4.2 - - MONGODB_ENVIRONMENT=sharded_cluster - - # basic smoke test of the unified topology - - stage: unified - node_js: 6 - env: - - MONGODB_VERSION=4.0 - - MONGODB_UNIFIED_TOPOLOGY=1 - - MONGODB_ENVIRONMENT=server - - stage: unified - node_js: 6 - env: - - MONGODB_VERSION=4.0 - - MONGODB_UNIFIED_TOPOLOGY=1 - - MONGODB_ENVIRONMENT=replica_set - - stage: unified - node_js: 6 - env: - - MONGODB_VERSION=4.0 - - MONGODB_UNIFIED_TOPOLOGY=1 - - MONGODB_ENVIRONMENT=sharded_cluster - - stage: unified - node_js: 6 - env: - - MONGODB_VERSION=4.2 - - MONGODB_UNIFIED_TOPOLOGY=1 - - MONGODB_ENVIRONMENT=replica_set - - stage: unified - node_js: 6 - env: - - MONGODB_VERSION=4.2 - - MONGODB_UNIFIED_TOPOLOGY=1 - - MONGODB_ENVIRONMENT=sharded_cluster diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5994b0bee8b..cbf6b2daa9b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,23 +7,127 @@ repository before making a change. Please note we have a [code of conduct][code-of-conduct], please follow it in all your interactions with the project. -## Commit messages +## Developer Startup Guide + +### Runtime + +It's recommended you install Node Version Manager for [unix systems][nvm-unix] or [windows][nvm-windows]. +While it isn't required we have a minimum node version requirement (look in [package.json](./package.json) under the "engines" key) and we can't accept code that does not work on the minimum specified version. + +### MongoDB Helpers + +- For setting up a cluster to test against we recommend using [mtools][mtools-install]. +- For managing installed versions of MongoDB, we recommend using [m](https://github.com/aheckmann/m). + +### VSCode Setup + +- Save the the workspace file [mongodbNodeDriver.code-workspace][workspace-file] next to where you have the driver cloned to and open this in VSCode. +Double check that the `folders.path` at the top of the file's json is correct. + +- We recommended these extensions: + - [eslint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) + - [test-explorer](https://marketplace.visualstudio.com/items?itemName=hbenl.vscode-test-explorer) + - [mocha-test-adapter](https://marketplace.visualstudio.com/items?itemName=hbenl.vscode-mocha-test-adapter) + - [coverage-gutters](https://marketplace.visualstudio.com/items?itemName=ryanluker.vscode-coverage-gutters) + - [pull-request-github](https://marketplace.visualstudio.com/items?itemName=github.vscode-pull-request-github) + - [mongodb](https://marketplace.visualstudio.com/items?itemName=mongodb.mongodb-vscode) + - [gitlens](https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens) + +If you just want to get formatting and linting working automatically use these settings: + +```jsonc +"settings":{ + "editor.codeActionsOnSave": { + "source.fixAll.eslint": true + }, + "[javascript]": { + "editor.defaultFormatter": "dbaeumer.vscode-eslint" + }, + "[typescript]": { + "editor.defaultFormatter": "dbaeumer.vscode-eslint", + } +} +``` + +### Running the tests + +- Start a mongod standalone with our [cluster_setup.sh](test/tools/cluster_setup.sh) script + - Usage: `./test/tools/cluster_setup.sh server` +- Run the tests with `npm test` + +### Tests FAQ + +- How can I run the tests against more than a standalone? + - You can use the `test/tools/cluster_setup.sh replica_set` + - You can prefix the npm test with a MONGODB_URI environment variable to point the tests to the correct deployment + - `env MONGODB_URI=mongodb://localhost:27017 npm test` + - If you are running against more than a standalone make sure your ulimit settings are in accordance with mongo's recommendations + - Changing the settings on the latest versions of [macos can be tricky read here][macos-ulimt] (unless you know you need it you shouldn't have to do the complicated maxproc steps) +- How can I run just one test? + - To run a single test, use mocha's grep flag: `npm run test -- -g 'test name'` + - If it's easier you can also isolate tests by adding `.only` Example: `it.only(‘cool test’, function() {})` + +### Commit messages Please follow the [Angular commit style][angular-commit-style]. +The format should look something like this (note the blank lines): + +```txt +(): + + + +NODE-XXXX +``` + +If there is a relevant NODE ticket number it should be in the footer section of the Angular style commit. + This helps the team automate [HISTORY.md](HISTORY.md) generation. +These are the commit types we make use of: + +- **feat:** A new feature +- **fix:** A bug fix +- **docs:** Documentation only changes +- **style:** Changes that do not affect the meaning of the code (e.g, formatting) +- **refactor:** A code change that neither fixes a bug nor adds a feature +- **perf:** A code change that improves performance +- **test:** Adding missing or correcting existing tests +- **chore:** Changes to the build process or auxiliary tools and libraries such as documentation generation + +## Conventions Guide + +Below are some conventions that aren't enforced by any of our tooling but we nonetheless do our best to adhere to: + +- **Ensure Promise usage is optional** + - There is a measurable overhead to Promise usage vs callbacks. + To support the broadest of driver usage scenarios we maintain an internal callback api while exposing a surface layer Promise API. +- **Disallow `export default` syntax** + - For our use case it is best if all imports / exports remain named. +- **As of 4.0 all code in src is in Typescript** + - Typescript provides a nice developer experience + As a product of using TS we should be using es6 syntax features whenever possible. +- **Errors** + - Error messages should be sentence case, and have no periods at the end. + - Use built-in error types where possible (not just `Error`, but `TypeError`/`RangeError`), also endeavor to create new Mongo-specific error types (e.g. `MongoNetworkError`) ## Pull Request Process 1. Update the README.md or similar documentation with details of changes you wish to make, if applicable. -2. Add any appropriate tests. -3. Make your code or other changes. -4. Review guidelines such as - [How to write the perfect pull request][github-perfect-pr], thanks! +1. Add any appropriate tests. +1. Make your code or other changes. +1. Review guidelines such as [How to write the perfect pull request][github-perfect-pr], thanks! +Take a look at [Github Flow][github-flow] for a more detailed explanation of this process. [angular-commit-style]: https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#commits [changelog]: CHANGELOG.md [code-of-conduct]: CODE_OF_CONDUCT.md [github-perfect-pr]: https://blog.github.com/2015-01-21-how-to-write-the-perfect-pull-request/ [mdb-core-values]: https://www.mongodb.com/company/ +[mtools-install]: http://blog.rueckstiess.com/mtools/install.html +[nvm-windows]: https://github.com/coreybutler/nvm-windows#installation--upgrades +[nvm-unix]: https://github.com/nvm-sh/nvm#install--update-script +[macos-ulimt]: https://wilsonmar.github.io/maximum-limits/ +[github-flow]: https://guides.github.com/introduction/flow/ +[workspace-file]: https://gist.githubusercontent.com/nbbeeken/d831a3801b4c463648c077b27da5057b/raw/8e986843e5e28019f7c0cebe5c6fa72407bf8afb/node-mongodb-native.code-workspace diff --git a/HISTORY.md b/HISTORY.md index e36590eb031..ecd91c77ec5 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,7 +1,167 @@ -# Change Log +# Changelog All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [4.0.0-beta.0](https://github.com/mongodb/node-mongodb-native/compare/v3.5.4...v4.0.0-beta.0) (2021-01-19) + + +### ⚠ BREAKING CHANGES + +* Clarify empty BulkOperation error message (#2697) +* **db:** suppress Db events (#2251) +* Integrate MongoOptions parser into driver (#2680) +* **bulk:** add collation to FindOperators (#2679) +* remove top-level write concern options (#2642) +* CreateIndexOp returns string, CreateIndexesOp returns array (#2666) +* conform CRUD result types to specification (#2651) +* remove deprecated Collection.group helper +* Options object precedence over URI options (#2691) +* adds async iterator for custom promises +* format sort in cursor and in sort builder (#2573) +* remove Cursor#transformStream +* remove deprecated find options +* pull CursorStream out of Cursor +* remove deprecated GridFS API +* only store topology on MongoClient (#2594) + +### Features + +* add `withReadConcern` builder to AbstractCursor ([#2645](https://github.com/mongodb/node-mongodb-native/issues/2645)) ([0cca729](https://github.com/mongodb/node-mongodb-native/commit/0cca729eb94ee942b775e14d57c44d57beda3fce)) +* add an internal `tryNext` method ([#2638](https://github.com/mongodb/node-mongodb-native/issues/2638)) ([43c94b6](https://github.com/mongodb/node-mongodb-native/commit/43c94b6d40824c6cfa531d6ee9ac6b307e4cbcc6)) +* add commitQuorum option to createIndexes command ([168a952](https://github.com/mongodb/node-mongodb-native/commit/168a952f60787f325b202c539a664b9e14451b65)) +* add explain support for cursor commands ([#2622](https://github.com/mongodb/node-mongodb-native/issues/2622)) ([bb1e081](https://github.com/mongodb/node-mongodb-native/commit/bb1e081e366612e0872d3c5ec0fadbb61e202ad6)) +* add explain support for non-cursor commands ([#2599](https://github.com/mongodb/node-mongodb-native/issues/2599)) ([4472308](https://github.com/mongodb/node-mongodb-native/commit/447230826cd764e2b766d3178d4fa369f8a4ebc4)) +* add MONGODB-AWS as a supported auth mechanism ([7f3cfba](https://github.com/mongodb/node-mongodb-native/commit/7f3cfbac15f537aa2ca9da145063f10c61390406)) +* Add MongoOption builder logic ([#2623](https://github.com/mongodb/node-mongodb-native/issues/2623)) ([cb9ee9e](https://github.com/mongodb/node-mongodb-native/commit/cb9ee9e6175a6654c3c300801884e4a3c3a653ac)) +* Add MongoOptions interface ([#2616](https://github.com/mongodb/node-mongodb-native/issues/2616)) ([54c456b](https://github.com/mongodb/node-mongodb-native/commit/54c456b4a4ff51c4f6734cff550d8aa53a47db15)) +* add types for the result of bulk initialize methods ([#2654](https://github.com/mongodb/node-mongodb-native/issues/2654)) ([3e5ff57](https://github.com/mongodb/node-mongodb-native/commit/3e5ff57d6438add80c1bad932114f3d086f1cc29)) +* adds "hidden" option when creating indexes ([ee8ca1a](https://github.com/mongodb/node-mongodb-native/commit/ee8ca1aaddd1da33689a49c99dcc1c6f42b6f9dd)) +* adds async iterator for custom promises ([16d6572](https://github.com/mongodb/node-mongodb-native/commit/16d65722a5b2318eee014511c94385e9d4f60ed7)) +* allow hinting the delete command ([95fedf4](https://github.com/mongodb/node-mongodb-native/commit/95fedf4ecf2da73802a4146ab0c7df6a0850103c)) +* bump wire protocol version for 4.4 ([6d3f313](https://github.com/mongodb/node-mongodb-native/commit/6d3f313a9defd12489b621896439b3f9ec8cb1ae)) +* convert the entire codebase to TypeScript ([272bc18](https://github.com/mongodb/node-mongodb-native/commit/272bc18f51351a9f18d6d1bc68413c1a0c1f649f)) +* deprecate `oplogReplay` for find commands ([24155e7](https://github.com/mongodb/node-mongodb-native/commit/24155e7905422460afc7e6abb120c596f40712c1)) +* directConnection adds unify behavior for replica set discovery ([#2349](https://github.com/mongodb/node-mongodb-native/issues/2349)) ([34c9195](https://github.com/mongodb/node-mongodb-native/commit/34c9195251adeeb1c9e8bc4234c8afb076d1d60e)) +* expand use of error labels for retryable writes ([c775a4a](https://github.com/mongodb/node-mongodb-native/commit/c775a4a1c53b8476eff6c9759b5647c9cbfa4e04)) +* implements promise provider ([e5b762c](https://github.com/mongodb/node-mongodb-native/commit/e5b762c6d53afa967f24c26a1d1b6c921757c9c9)) +* Integrate MongoOptions parser into driver ([#2680](https://github.com/mongodb/node-mongodb-native/issues/2680)) ([b1bdb06](https://github.com/mongodb/node-mongodb-native/commit/b1bdb06cbe95fd320afff00ccb8fea666c79b444)) +* introduce AbstractCursor and its concrete subclasses ([#2619](https://github.com/mongodb/node-mongodb-native/issues/2619)) ([a2d78b2](https://github.com/mongodb/node-mongodb-native/commit/a2d78b22b28ae649fa2c4e28294a3a03c446373e)) +* introduce an interruptable async interval timer ([21cbabd](https://github.com/mongodb/node-mongodb-native/commit/21cbabdb1cf9ebee887bda547aa9116781cf03ae)) +* introduce BufferPool to replace BufferList ([#2669](https://github.com/mongodb/node-mongodb-native/issues/2669)) ([3c56efc](https://github.com/mongodb/node-mongodb-native/commit/3c56efcf25a9ca8085a37f2ebac8cb3bff6d6d6c)) +* introduce typescript migration pipeline ([f40cffc](https://github.com/mongodb/node-mongodb-native/commit/f40cffc6ccec032c7266a33b5e53728d9ae11294)) +* Options object precedence over URI options ([#2691](https://github.com/mongodb/node-mongodb-native/issues/2691)) ([85d8d09](https://github.com/mongodb/node-mongodb-native/commit/85d8d09713e2a80442dfbb38ecc887204306ba17)) +* reintroduce clone and rewind for cursors ([#2647](https://github.com/mongodb/node-mongodb-native/issues/2647)) ([a5154fb](https://github.com/mongodb/node-mongodb-native/commit/a5154fb5977dddd88e57f9d20965e95fa7ddb80b)) +* remove `parallelCollectionScan` helper ([9dee21f](https://github.com/mongodb/node-mongodb-native/commit/9dee21feefab9a8f20e289e6ff7abece40ef7d0b)) +* remove Cursor#transformStream ([a54be7a](https://github.com/mongodb/node-mongodb-native/commit/a54be7afd665d92337a8ba2e206cc3e6ce5e5773)) +* remove legacy topology types ([6aa2434](https://github.com/mongodb/node-mongodb-native/commit/6aa2434628e85ead8e5be620c27ebe8ab08a1c05)) +* remove reIndex ([6b510a6](https://github.com/mongodb/node-mongodb-native/commit/6b510a689ab0dc44b3302ad21c171e75f9059716)) +* remove the collection save method ([d5bb496](https://github.com/mongodb/node-mongodb-native/commit/d5bb49637853c841b47df020807edf9adb5ef804)) +* remove top-level write concern options ([#2642](https://github.com/mongodb/node-mongodb-native/issues/2642)) ([6914e87](https://github.com/mongodb/node-mongodb-native/commit/6914e875b37fb0ad444105ad24839d50c5c224d4)) +* support `allowDiskUse` for find commands ([dbc0b37](https://github.com/mongodb/node-mongodb-native/commit/dbc0b3722516a128c253bf85366a3432756ff92a)) +* support creating collections and indexes in transactions ([917f2b0](https://github.com/mongodb/node-mongodb-native/commit/917f2b088f22f4c6ed803f0349859d057389ac1e)) +* **bulk:** add collation to FindOperators ([#2679](https://github.com/mongodb/node-mongodb-native/issues/2679)) ([a41d503](https://github.com/mongodb/node-mongodb-native/commit/a41d503ebd061977e712ac26dc7c757ab03cab14)) +* support hedged reads ([2b7b936](https://github.com/mongodb/node-mongodb-native/commit/2b7b936b532c1461dba59a4840978beea7b934fb)) +* support passing a hint to findOneAndReplace/findOneAndUpdate ([faee15b](https://github.com/mongodb/node-mongodb-native/commit/faee15b686b895b84fd0b52c1e69e0caec769732)) +* support shorter SCRAM conversations ([6b9ff05](https://github.com/mongodb/node-mongodb-native/commit/6b9ff0561d14818bf07f4946ade04fc54683d0b9)) +* **db:** remove createCollection strict mode ([bb13764](https://github.com/mongodb/node-mongodb-native/commit/bb137643b2a95bd5898d2fef4d761de5f2e2cde0)) +* **FindCursor:** fluent builder for allowDiskUse option ([#2678](https://github.com/mongodb/node-mongodb-native/issues/2678)) ([d442aac](https://github.com/mongodb/node-mongodb-native/commit/d442aac66e7a236decdfbeb5be0cc8a163486534)) +* **geoHaystackSearch:** remove geoHaystackSearch ([5a1b61c](https://github.com/mongodb/node-mongodb-native/commit/5a1b61c9f2baf8f6f3cec4c34ce2db52272cd49d)) +* support speculative authentication in scram-sha and x509 ([f71f09b](https://github.com/mongodb/node-mongodb-native/commit/f71f09bd466f0630bbe6859d8ed074ecd5f4a51f)) +* support the streaming protocol for topology updates ([7e9c5bc](https://github.com/mongodb/node-mongodb-native/commit/7e9c5bc5e8b10ae146d80535a44221ddb9ded069)) +* use error labels for retryable writes in legacy topologies ([fefc165](https://github.com/mongodb/node-mongodb-native/commit/fefc1651a885ec28758271c9e3c36104b05bdb75)) + + +### Bug Fixes + +* add all accessor tags to exported symbols ([#2649](https://github.com/mongodb/node-mongodb-native/issues/2649)) ([55534c9](https://github.com/mongodb/node-mongodb-native/commit/55534c9c6734e44e944f762421754df88e42b6a1)) +* allow client connect after close ([#2581](https://github.com/mongodb/node-mongodb-native/issues/2581)) ([1aecf96](https://github.com/mongodb/node-mongodb-native/commit/1aecf964d79344acea4ff4387d2faf51b78cfe78)) +* allow client re-connect after close ([#2615](https://github.com/mongodb/node-mongodb-native/issues/2615)) ([9a176ef](https://github.com/mongodb/node-mongodb-native/commit/9a176efbf15bb7f3dc30a4302d1550af6eb910d3)) +* allow event loop to process during wait queue processing ([#2541](https://github.com/mongodb/node-mongodb-native/issues/2541)) ([7bbc783](https://github.com/mongodb/node-mongodb-native/commit/7bbc783f83dd86929e030224177b312c2152f814)) +* always clear cancelled wait queue members during processing ([7e942ba](https://github.com/mongodb/node-mongodb-native/commit/7e942bacbf6bb69c0072fb59cdcaeced2c046a2e)) +* always include `writeErrors` on a `BulkWriteError` instance ([0759a0e](https://github.com/mongodb/node-mongodb-native/commit/0759a0ef08737bf99e02e2e1e2def2e1c9c80185)) +* apply bson options for bulk operations ([#2601](https://github.com/mongodb/node-mongodb-native/issues/2601)) ([e01cafd](https://github.com/mongodb/node-mongodb-native/commit/e01cafdd1ab0f3056d86aa6149caf2605e81075a)) +* assert update/replace atomic requirements in bulk operations ([911c25d](https://github.com/mongodb/node-mongodb-native/commit/911c25d201fc1d8acd359484d73d4a179fd6c08f)) +* awaitable isMaster timeout must respect connectTimeoutMS ([#2650](https://github.com/mongodb/node-mongodb-native/issues/2650)) ([8d44cc2](https://github.com/mongodb/node-mongodb-native/commit/8d44cc232a27d11485706ae4cac7d61e4d37bd09)) +* change prepublishOnly npm script to prepare ([95440fb](https://github.com/mongodb/node-mongodb-native/commit/95440fbb3b506e5b30b5c39825e2df0b45dbd011)) +* Change socket timeout default to 0 ([#2564](https://github.com/mongodb/node-mongodb-native/issues/2564)) ([7ed6dbf](https://github.com/mongodb/node-mongodb-native/commit/7ed6dbf7d541a10513f3bd93f1c415ed0ced1b83)) +* clarify handle wrong set name single topology ([93cd8b3](https://github.com/mongodb/node-mongodb-native/commit/93cd8b3183541fd26b448f78e200c49691451e35)) +* connection leak if wait queue member cancelled ([#2563](https://github.com/mongodb/node-mongodb-native/issues/2563)) ([4018a1e](https://github.com/mongodb/node-mongodb-native/commit/4018a1e7acc587ad2f2c6faf2d53c459c73058be)) +* correct legacy require paths ([f96a97f](https://github.com/mongodb/node-mongodb-native/commit/f96a97fff9d9d71a289cbe20f72f2a3b17347d72)) +* correct typeof check in checkSupportedServer ([#2690](https://github.com/mongodb/node-mongodb-native/issues/2690)) ([421fe6e](https://github.com/mongodb/node-mongodb-native/commit/421fe6e0f856d74a421f11b35ed72a4910811a3f)) +* correctly re-establishes pipe destinations ([#2592](https://github.com/mongodb/node-mongodb-native/issues/2592)) ([7d023a6](https://github.com/mongodb/node-mongodb-native/commit/7d023a6eda0fca52d68af6ae4e66c649d04b3c3e)) +* correctly use template string for connection string error message ([b4d89ea](https://github.com/mongodb/node-mongodb-native/commit/b4d89eaaca9d374f693cff830411e12191efd1c0)) +* createCollection only uses listCollections in strict mode ([ccccbc8](https://github.com/mongodb/node-mongodb-native/commit/ccccbc8c49bce0bd7378fd557a228b86aa7a45e4)) +* db.command to not inherit options from parent ([8f6c247](https://github.com/mongodb/node-mongodb-native/commit/8f6c2477f93400abf3606cfe908d209d16d3d4d9)) +* don't depend on private node api for `Timeout` wrapper ([e6dc1f4](https://github.com/mongodb/node-mongodb-native/commit/e6dc1f48d62b68ba56b93359d7aa755c08985867)) +* don't immediately schedule monitoring after streaming failure ([7a3b99b](https://github.com/mongodb/node-mongodb-native/commit/7a3b99ba5dbffd34282e2d52691011026b0b065a)) +* don't reset monitor if we aren't streaming topology changes ([2f23dd7](https://github.com/mongodb/node-mongodb-native/commit/2f23dd7a4fca0c93d7b7432f99273eab8d11b01a)) +* don't try to calculate sMax if there are no viable servers ([dd24cee](https://github.com/mongodb/node-mongodb-native/commit/dd24cee5816b66f0a86f0497f1c98921b0006473)) +* ensure implicit sessions are ended consistently ([1a443e7](https://github.com/mongodb/node-mongodb-native/commit/1a443e70bfdbee61b72ec23d7ef338ad189b667d)) +* enumerate function override call signatures ([#2687](https://github.com/mongodb/node-mongodb-native/issues/2687)) ([2492dd2](https://github.com/mongodb/node-mongodb-native/commit/2492dd2ff7a4f1cc49d74942e94a2a23c3857723)) +* error label checking & insertOne where retryWrites is false ([d4502aa](https://github.com/mongodb/node-mongodb-native/commit/d4502aa957129a86f1dea53388697623263c0c59)) +* filter servers before applying reducers ([99b86b3](https://github.com/mongodb/node-mongodb-native/commit/99b86b32a032b9b39f9fec07a90095958b977bb0)) +* handle session with unacknowledged write ([4aeaedf](https://github.com/mongodb/node-mongodb-native/commit/4aeaedf3b12a196127852522bcc81d8b507676d5)) +* hint should raise error on unacknowledged writes ([665b352](https://github.com/mongodb/node-mongodb-native/commit/665b3524080776d836c69351c3db1cb7f211c3dc)) +* honor journal=true in connection string ([41d291a](https://github.com/mongodb/node-mongodb-native/commit/41d291abd227650927879f499f4b2d19ae9a651c)) +* ignore ENOTFOUND during TXT record lookup ([b1e15a8](https://github.com/mongodb/node-mongodb-native/commit/b1e15a8b038ec9214b977f4653cc8853329e4a41)) +* ingest WC as a simple object or number for w value ([#2695](https://github.com/mongodb/node-mongodb-native/issues/2695)) ([f5f9fd4](https://github.com/mongodb/node-mongodb-native/commit/f5f9fd4779f931a425517b24900347cdcf7a2790)) +* internal access modifier on symbol properties ([#2664](https://github.com/mongodb/node-mongodb-native/issues/2664)) ([f6d9b81](https://github.com/mongodb/node-mongodb-native/commit/f6d9b81fad98ac48c119c5c022c2d868c7cf968b)) +* ipv6 is not supported when using dns service discovery ([3cc53cb](https://github.com/mongodb/node-mongodb-native/commit/3cc53cbf1cefc3590afc2f04df9e4aa32ea1085c)) +* make MongoBulkWriteError conform to CRUD spec ([#2621](https://github.com/mongodb/node-mongodb-native/issues/2621)) ([7aa3567](https://github.com/mongodb/node-mongodb-native/commit/7aa3567e651025f4b56f1932d536f94ced642f1d)) +* make the owner property of ClientSessionOptions optional ([#2656](https://github.com/mongodb/node-mongodb-native/issues/2656)) ([d811a01](https://github.com/mongodb/node-mongodb-native/commit/d811a01f961b55a55afe5ed73e6e9a477e6f6e35)) +* make tryNext and Batch public ([#2675](https://github.com/mongodb/node-mongodb-native/issues/2675)) ([634ae4f](https://github.com/mongodb/node-mongodb-native/commit/634ae4f93013c824bc153f132f0dd6c9bd2cc127)) +* min and max take Document parameters, not numbers ([#2657](https://github.com/mongodb/node-mongodb-native/issues/2657)) ([698533f](https://github.com/mongodb/node-mongodb-native/commit/698533f3fe0176a4d361e20e0dfa1c049a1af862)) +* move kerberos client setup from prepare to auth ([#2655](https://github.com/mongodb/node-mongodb-native/issues/2655)) ([93ef9e8](https://github.com/mongodb/node-mongodb-native/commit/93ef9e8f36acb8801859bb83933a7196d509b11b)) +* npm script check:test failure on ubuntu ([addb4f5](https://github.com/mongodb/node-mongodb-native/commit/addb4f5960da99c900ca496917e93fb7ac789ddf)) +* only consider MongoError subclasses for retryability ([265fe40](https://github.com/mongodb/node-mongodb-native/commit/265fe40cf29992764d1ab030a1ee4dca97cd7c7c)) +* only force server id generation if requested ([#2653](https://github.com/mongodb/node-mongodb-native/issues/2653)) ([577d6eb](https://github.com/mongodb/node-mongodb-native/commit/577d6eb2387f4ea45964ef4c028dc8535f782a66)) +* only use ServerDescription equality to prevent event emission ([ddf151d](https://github.com/mongodb/node-mongodb-native/commit/ddf151da63b1212a433bf73b1fdc6ff0e83182c2)) +* pass optional promise lib to maybePromise ([52be01f](https://github.com/mongodb/node-mongodb-native/commit/52be01feabfbfbbd73523086cff1ac7020393456)) +* pass options into `commandSupportsReadConcern` ([e855c83](https://github.com/mongodb/node-mongodb-native/commit/e855c83d8b73f4ce57a11193a1e52461ab2cd4db)) +* permit waking async interval with unreliable clock ([#2551](https://github.com/mongodb/node-mongodb-native/issues/2551)) ([a2c113f](https://github.com/mongodb/node-mongodb-native/commit/a2c113fbd1f3cf013b7a3caf227a74d69e67a3b1)) +* prevent bulk operations from being executed multiple times ([#2658](https://github.com/mongodb/node-mongodb-native/issues/2658)) ([bb883f7](https://github.com/mongodb/node-mongodb-native/commit/bb883f7ea146db7569d1bd8032f42bed4e49d3dd)) +* reduce default keepalive time to align with Azure defaults ([ffc0f55](https://github.com/mongodb/node-mongodb-native/commit/ffc0f555241f565ea581a04a6c0111798f61ccce)) +* remove check for NonResumableChangeStreamError label ([7cf669d](https://github.com/mongodb/node-mongodb-native/commit/7cf669d378ed87ee4dd20068e24c5dbb3f62bc83)) +* remove circular dependency warnings on node 14 ([f32fa15](https://github.com/mongodb/node-mongodb-native/commit/f32fa15ba2b0f8832f3e5dec971173d121390450)) +* removed geoNear deprecation ([a3408e6](https://github.com/mongodb/node-mongodb-native/commit/a3408e69616a176e1f7e0879918f76f10ede44a9)) +* revert BSON Map export removal ([#2704](https://github.com/mongodb/node-mongodb-native/issues/2704)) ([2b74387](https://github.com/mongodb/node-mongodb-native/commit/2b743876f43f80801e5d54b3ba6fdb4fb97cf4b6)) +* SASL signature consists of the string representation of the payload ([#2529](https://github.com/mongodb/node-mongodb-native/issues/2529)) ([e7d2693](https://github.com/mongodb/node-mongodb-native/commit/e7d26930168d134f1626fb044147c2a0b9fb3044)) +* single `readPreferenceTags` should be parsed as an array ([98e879d](https://github.com/mongodb/node-mongodb-native/commit/98e879d249e1adca9d23a8a75392b3d6bac5fd98)) +* store name of collection for more informative error messages ([979d41e](https://github.com/mongodb/node-mongodb-native/commit/979d41e14f5acf69bac094b3863591ee8e01fd9c)) +* support write concern provided as string in `fromOptions` ([637f428](https://github.com/mongodb/node-mongodb-native/commit/637f4288c1edb799267ccbce6d25a49304f6149c)) +* tests using lib prohibited ([#2625](https://github.com/mongodb/node-mongodb-native/issues/2625)) ([5e04fff](https://github.com/mongodb/node-mongodb-native/commit/5e04fffa989532e12ff89544bc7231b2d2e1cfb9)) +* **ChangeStream:** handle null changes ([9db8369](https://github.com/mongodb/node-mongodb-native/commit/9db8369e5242e57cf516a50e682a444e48c32db7)) +* **ChangeStream:** make CursorNotFound error resumable ([3d8ac55](https://github.com/mongodb/node-mongodb-native/commit/3d8ac55a47c9313d3a7e93bbf5584f3759ed94f3)) +* **ChangeStream:** should resume from errors when iterating ([7a8a533](https://github.com/mongodb/node-mongodb-native/commit/7a8a5336cf33837c44290bb1ee51d806315e1b09)) +* **ChangeStream:** whitelist change stream resumable errors ([f4bf912](https://github.com/mongodb/node-mongodb-native/commit/f4bf9125e9a9e64d03e625580bd7c84d03fa8d09)), closes [#17](https://github.com/mongodb/node-mongodb-native/issues/17) [#18](https://github.com/mongodb/node-mongodb-native/issues/18) +* **ClientSession:** correct toBSON TypeScript signature ([#2686](https://github.com/mongodb/node-mongodb-native/issues/2686)) ([cc4b9e0](https://github.com/mongodb/node-mongodb-native/commit/cc4b9e051e940f0969cd6ea45675a8493ab591d3)) +* writes within transactions are not retryable ([08fd347](https://github.com/mongodb/node-mongodb-native/commit/08fd3476885ca9d9c2860f5992f8f0f29a9e0bd2)) +* **cursor:** transforms should only be applied once to documents ([a52a860](https://github.com/mongodb/node-mongodb-native/commit/a52a8608b267b2fbd5806c992c2d18355e262ac3)) +* throw an error if `allowDiskUse` is used on MongoDB < 3.2 ([ebeae56](https://github.com/mongodb/node-mongodb-native/commit/ebeae5617df7f1d5606c6d41b45130615cfff811)) +* typings for readConcern ([4f9d4ce](https://github.com/mongodb/node-mongodb-native/commit/4f9d4ceafdcca01d49e6eeb286a9c27ddf485969)) +* unordered bulk write should attempt to execute all batches ([fa07519](https://github.com/mongodb/node-mongodb-native/commit/fa07519bf0b1d2278c0c824e6471c62267c652ef)) +* use async interruptable interval for server monitoring ([d792806](https://github.com/mongodb/node-mongodb-native/commit/d792806484308999ea10d091a2634a65eaa4d330)) +* **sdam:** use ObjectId comparison to track maxElectionId ([db991d6](https://github.com/mongodb/node-mongodb-native/commit/db991d6916306d1fe08508d4c3e8f7a37d7fd21f)) +* use options for readPreference in client ([800e71e](https://github.com/mongodb/node-mongodb-native/commit/800e71e7d7ae0fa8fcfc5e1612a6ee9ce6bc05a1)) +* use properly camel cased form of `mapReduce` for command ([c1ed2c1](https://github.com/mongodb/node-mongodb-native/commit/c1ed2c1ce4c6f2d40cd1c7b84ad672a90a09c83b)) +* use require instead of readFileSync for driver.version ([#2652](https://github.com/mongodb/node-mongodb-native/issues/2652)) ([e7a42bb](https://github.com/mongodb/node-mongodb-native/commit/e7a42bb4b67d8842e4c5c3f9e946093fd01dd1d3)) +* **GridFS:** emit error on bad options ([21b8ae9](https://github.com/mongodb/node-mongodb-native/commit/21b8ae9009ede976e71d1a3e160e4150117e7ad9)) +* **GridFS:** emit error on bad options ([e11e573](https://github.com/mongodb/node-mongodb-native/commit/e11e573e30fc6416a51a2622c47075a8a425676a)) +* user roles take single string & DDL readPreference tests ([98162c3](https://github.com/mongodb/node-mongodb-native/commit/98162c39b5a7535e2edce54491bd949db72b49fe)) +* warning message fix should not check for topology existence ([f7094b2](https://github.com/mongodb/node-mongodb-native/commit/f7094b20ab0adf0dde3486b1ed59df8ee1c68e8a)) + + +* **db:** suppress Db events ([#2251](https://github.com/mongodb/node-mongodb-native/issues/2251)) ([eed1131](https://github.com/mongodb/node-mongodb-native/commit/eed11310fea5c06931fc7b41c62a360ada28734e)) +* Clarify empty BulkOperation error message ([#2697](https://github.com/mongodb/node-mongodb-native/issues/2697)) ([34f488d](https://github.com/mongodb/node-mongodb-native/commit/34f488d913a88c9f7498cdb28c039455b03befb1)) +* conform CRUD result types to specification ([#2651](https://github.com/mongodb/node-mongodb-native/issues/2651)) ([0135e9e](https://github.com/mongodb/node-mongodb-native/commit/0135e9e5b6660b8e3575791ab206f198375dece2)) +* CreateIndexOp returns string, CreateIndexesOp returns array ([#2666](https://github.com/mongodb/node-mongodb-native/issues/2666)) ([e12c485](https://github.com/mongodb/node-mongodb-native/commit/e12c485ebcda7b0d4dfeb145de2df6a9c514577c)) +* format sort in cursor and in sort builder ([#2573](https://github.com/mongodb/node-mongodb-native/issues/2573)) ([8aad134](https://github.com/mongodb/node-mongodb-native/commit/8aad13491e26446ba357e44c4e1929da71821845)) +* only store topology on MongoClient ([#2594](https://github.com/mongodb/node-mongodb-native/issues/2594)) ([33fa6b2](https://github.com/mongodb/node-mongodb-native/commit/33fa6b2df76dd878e6acc6d6259e1545542b197d)) +* pull CursorStream out of Cursor ([054838f](https://github.com/mongodb/node-mongodb-native/commit/054838f00e75a1ed6e41f320c55d62fb3b63e583)) +* remove deprecated Collection.group helper ([cf5c865](https://github.com/mongodb/node-mongodb-native/commit/cf5c865f9e1775c82d0510dcb32aca2e168695c3)) +* remove deprecated find options ([0e6375a](https://github.com/mongodb/node-mongodb-native/commit/0e6375a22fc3d1f4ce10846b98dafaa65044ef6d)) +* remove deprecated GridFS API ([bee0aa2](https://github.com/mongodb/node-mongodb-native/commit/bee0aa2a2cfeb2e83aca4d4aef433179b373ca23)) + ## [3.5.4](https://github.com/mongodb/node-mongodb-native/compare/v3.5.3...v3.5.4) (2020-02-25) diff --git a/Makefile b/Makefile deleted file mode 100644 index 36e120248c5..00000000000 --- a/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -NODE = node -NPM = npm -JSDOC = jsdoc -name = all - -generate_docs: - # cp -R ./HISTORY.md ./docs/content/meta/release-notes.md - hugo -s docs/reference -d ../../public - $(JSDOC) -c conf.json -t docs/jsdoc-template/ -d ./public/api - cp -R ./public/api/scripts ./public/. - cp -R ./public/api/styles ./public/. diff --git a/README.md b/README.md index 672ccf39c3e..5009c4b680b 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,18 @@ -[![npm](https://nodei.co/npm/mongodb.png?downloads=true&downloadRank=true)](https://nodei.co/npm/mongodb/) [![npm](https://nodei.co/npm-dl/mongodb.png?months=6&height=3)](https://nodei.co/npm/mongodb/) +# MongoDB NodeJS Driver -[![Build Status](https://secure.travis-ci.org/mongodb/node-mongodb-native.svg?branch=2.1)](http://travis-ci.org/mongodb/node-mongodb-native) -[![Coverage Status](https://coveralls.io/repos/github/mongodb/node-mongodb-native/badge.svg?branch=2.1)](https://coveralls.io/github/mongodb/node-mongodb-native?branch=2.1) -[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/mongodb/node-mongodb-native?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) +The official [MongoDB](https://www.mongodb.com/) driver for Node.js. -# Description +**NOTE: v4.x was recently released with breaking API changes. You can find a list of changes [here](docs/CHANGES_4.0.0.md).** -The official [MongoDB](https://www.mongodb.com/) driver for Node.js. Provides a high-level API on top of [mongodb-core](https://www.npmjs.com/package/mongodb-core) that is meant for end users. +## Quick Links -**NOTE: v3.x was recently released with breaking API changes. You can find a list of changes [here](CHANGES_3.0.0.md).** - -## MongoDB Node.JS Driver - -| what | where | -|---------------|------------------------------------------------| -| documentation | http://mongodb.github.io/node-mongodb-native | -| api-doc | http://mongodb.github.io/node-mongodb-native/3.1/api | -| source | https://github.com/mongodb/node-mongodb-native | -| mongodb | http://www.mongodb.org | +| what | where | +|---------------|------------------------------------------------------------------------------------------------------------------| +| documentation | [https://docs.mongodb.com/drivers/node](https://docs.mongodb.com/drivers/node) | +| api-doc | [https://mongodb.github.io/node-mongodb-native/4.0/api/](https://mongodb.github.io/node-mongodb-native/4.0/api/) | +| npm package | [https://www.npmjs.com/package/mongodb](https://www.npmjs.com/package/mongodb) | +| source | [https://github.com/mongodb/node-mongodb-native](https://github.com/mongodb/node-mongodb-native) | +| mongodb | [https://www.mongodb.com](https://www.mongodb.com) | ### Bugs / Feature Requests @@ -33,7 +28,7 @@ Core Server (i.e. SERVER) project are **public**. ### Support / Feedback -For issues with, questions about, or feedback for the Node.js driver, please look into our [support channels](http://www.mongodb.org/about/support). Please do not email any of the driver developers directly with issues or questions - you're more likely to get an answer on the [mongodb-user](http://groups.google.com/group/mongodb-user>) list on Google Groups. +For issues with, questions about, or feedback for the Node.js driver, please look into our [support channels](https://docs.mongodb.com/manual/support). Please do not email any of the driver developers directly with issues or questions - you're more likely to get an answer on the [MongoDB Community Forums](https://community.mongodb.com/tags/c/drivers-odms-connectors/7/node-js-driver). ### Change Log @@ -43,127 +38,59 @@ Change history can be found in [`HISTORY.md`](HISTORY.md). For version compatibility matrices, please refer to the following links: - * [MongoDB](https://docs.mongodb.com/ecosystem/drivers/driver-compatibility-reference/#reference-compatibility-mongodb-node) - * [NodeJS](https://docs.mongodb.com/ecosystem/drivers/driver-compatibility-reference/#reference-compatibility-language-node) +- [MongoDB](https://docs.mongodb.com/drivers/node/compatibility#mongodb-compatibility) +- [NodeJS](https://docs.mongodb.com/drivers/node/compatibility#language-compatibility) -# Installation +## Installation -The recommended way to get started using the Node.js 3.0 driver is by using the `npm` (Node Package Manager) to install the dependency in your project. +The recommended way to get started using the Node.js 4.0 driver is by using the `npm` (Node Package Manager) to install the dependency in your project. -## MongoDB Driver - -Given that you have created your own project using `npm init` we install the MongoDB driver and its dependencies by executing the following `npm` command. +After you've created your own project using `npm init`, you can run: ```bash -npm install mongodb --save +npm install mongodb +# or ... +yarn add mongodb ``` This will download the MongoDB driver and add a dependency entry in your `package.json` file. -You can also use the [Yarn](https://yarnpkg.com/en) package manager. - ## Troubleshooting The MongoDB driver depends on several other packages. These are: -* [mongodb-core](https://github.com/mongodb-js/mongodb-core) -* [bson](https://github.com/mongodb/js-bson) -* [kerberos](https://github.com/mongodb-js/kerberos) -* [node-gyp](https://github.com/nodejs/node-gyp) - -The `kerberos` package is a C++ extension that requires a build environment to be installed on your system. You must be able to build Node.js itself in order to compile and install the `kerberos` module. Furthermore, the `kerberos` module requires the MIT Kerberos package to correctly compile on UNIX operating systems. Consult your UNIX operation system package manager for what libraries to install. - -**Windows already contains the SSPI API used for Kerberos authentication. However, you will need to install a full compiler tool chain using Visual Studio C++ to correctly install the Kerberos extension.** - -### Diagnosing on UNIX - -If you don’t have the build-essentials, this module won’t build. In the case of Linux, you will need gcc, g++, Node.js with all the headers and Python. The easiest way to figure out what’s missing is by trying to build the Kerberos project. You can do this by performing the following steps. - -```bash -git clone https://github.com/mongodb-js/kerberos -cd kerberos -npm install -``` - -If all the steps complete, you have the right toolchain installed. If you get the error "node-gyp not found," you need to install `node-gyp` globally: - -```bash -npm install -g node-gyp -``` - -If it correctly compiles and runs the tests you are golden. We can now try to install the `mongod` driver by performing the following command. - -```bash -cd yourproject -npm install mongodb --save -``` - -If it still fails the next step is to examine the npm log. Rerun the command but in this case in verbose mode. - -```bash -npm --loglevel verbose install mongodb -``` - -This will print out all the steps npm is performing while trying to install the module. - -### Diagnosing on Windows - -A compiler tool chain known to work for compiling `kerberos` on Windows is the following. - -* Visual Studio C++ 2010 (do not use higher versions) -* Windows 7 64bit SDK -* Python 2.7 or higher +- [bson](https://github.com/mongodb/js-bson) +- [bson-ext](https://github.com/mongodb-js/bson-ext) +- [kerberos](https://github.com/mongodb-js/kerberos) +- [mongodb-client-encryption](https://github.com/mongodb/libmongocrypt#readme) -Open the Visual Studio command prompt. Ensure `node.exe` is in your path and install `node-gyp`. - -```bash -npm install -g node-gyp -``` - -Next, you will have to build the project manually to test it. Clone the repo, install dependencies and rebuild: - -```bash -git clone https://github.com/christkv/kerberos.git -cd kerberos -npm install -node-gyp rebuild -``` - -This should rebuild the driver successfully if you have everything set up correctly. - -### Other possible issues - -Your Python installation might be hosed making gyp break. Test your deployment environment first by trying to build Node.js itself on the server in question, as this should unearth any issues with broken packages (and there are a lot of broken packages out there). - -Another tip is to ensure your user has write permission to wherever the Node.js modules are being installed. +Some of these packages include native C++ extensions, consult the [trouble shooting guide here](docs/native-extensions.md) if you run into issues. ## Quick Start -This guide will show you how to set up a simple application using Node.js and MongoDB. Its scope is only how to set up the driver and perform the simple CRUD operations. For more in-depth coverage, see the [tutorials](docs/reference/content/tutorials/main.md). +This guide will show you how to set up a simple application using Node.js and MongoDB. Its scope is only how to set up the driver and perform the simple CRUD operations. For more in-depth coverage, see the [official documentation](https://docs.mongodb.com/drivers/node/). ### Create the `package.json` file First, create a directory where your application will live. ```bash -mkdir myproject -cd myproject +mkdir myProject +cd myProject ``` Enter the following command and answer the questions to create the initial structure for your new project: ```bash -npm init +npm init -y ``` -Next, install the driver dependency. +Next, install the driver as a dependency. ```bash -npm install mongodb --save +npm install mongodb ``` -You should see **NPM** download a lot of files. Once it's done you'll find all the downloaded packages under the **node_modules** directory. - ### Start a MongoDB Server For complete MongoDB installation instructions, see [the manual](https://docs.mongodb.org/manual/installation/). @@ -183,27 +110,41 @@ You should see the **mongod** process start up and print some status information Create a new **app.js** file and add the following code to try out some basic CRUD operations using the MongoDB driver. -Add code to connect to the server and the database **myproject**: +Add code to connect to the server and the database **myProject**: + +> **NOTE:** All the examples below use async/await syntax. +> +> However, all async API calls support an optional callback as the final argument, +> if a callback is provided a Promise will not be returned. ```js -const MongoClient = require('mongodb').MongoClient; -const assert = require('assert'); +const { MongoClient } = require('mongodb') +// or as an es module: +// import { MongoClient } from 'mongodb' // Connection URL -const url = 'mongodb://localhost:27017'; +const url = 'mongodb://localhost:27017' +const client = new MongoClient(url) // Database Name -const dbName = 'myproject'; +const dbName = 'myProject' -// Use connect method to connect to the server -MongoClient.connect(url, function(err, client) { - assert.equal(null, err); - console.log("Connected successfully to server"); +async function main() { + // Use connect method to connect to the server + await client.connect() + console.log('Connected successfully to server') + const db = client.db(dbName) + const collection = db.collection('documents') - const db = client.db(dbName); + // the following code examples can be pasted here... - client.close(); -}); + return 'done.' +} + +main() + .then(console.log) + .catch(console.error) + .finally(() => client.close()) ``` Run your app from the command line with: @@ -220,127 +161,31 @@ Add to **app.js** the following function which uses the **insertMany** method to add three documents to the **documents** collection. ```js -const insertDocuments = function(db, callback) { - // Get the documents collection - const collection = db.collection('documents'); - // Insert some documents - collection.insertMany([ - {a : 1}, {a : 2}, {a : 3} - ], function(err, result) { - assert.equal(err, null); - assert.equal(3, result.result.n); - assert.equal(3, result.ops.length); - console.log("Inserted 3 documents into the collection"); - callback(result); - }); -} -``` - -The **insert** command returns an object with the following fields: - -* **result** Contains the result document from MongoDB -* **ops** Contains the documents inserted with added **_id** fields -* **connection** Contains the connection used to perform the insert - -Add the following code to call the **insertDocuments** function: - -```js -const MongoClient = require('mongodb').MongoClient; -const assert = require('assert'); - -// Connection URL -const url = 'mongodb://localhost:27017'; - -// Database Name -const dbName = 'myproject'; - -// Use connect method to connect to the server -MongoClient.connect(url, function(err, client) { - assert.equal(null, err); - console.log("Connected successfully to server"); - - const db = client.db(dbName); - - insertDocuments(db, function() { - client.close(); - }); -}); -``` - -Run the updated **app.js** file: - -```bash -node app.js +const insertResult = await collection.insertMany([{ a: 1 }, { a: 2 }, { a: 3 }]) +console.log('Inserted documents =>', insertResult) ``` -The operation returns the following output: - -```bash -Connected successfully to server -Inserted 3 documents into the collection -``` +The **insertMany** command returns an object with information about the insert operations. ### Find All Documents Add a query that returns all the documents. ```js -const findDocuments = function(db, callback) { - // Get the documents collection - const collection = db.collection('documents'); - // Find some documents - collection.find({}).toArray(function(err, docs) { - assert.equal(err, null); - console.log("Found the following records"); - console.log(docs) - callback(docs); - }); -} +const findResult = await collection.find({}).toArray() +console.log('Found documents =>', findResult) ``` -This query returns all the documents in the **documents** collection. Add the **findDocument** method to the **MongoClient.connect** callback: - -```js -const MongoClient = require('mongodb').MongoClient; -const assert = require('assert'); - -// Connection URL -const url = 'mongodb://localhost:27017'; - -// Database Name -const dbName = 'myproject'; - -// Use connect method to connect to the server -MongoClient.connect(url, function(err, client) { - assert.equal(null, err); - console.log("Connected correctly to server"); - - const db = client.db(dbName); - - insertDocuments(db, function() { - findDocuments(db, function() { - client.close(); - }); - }); -}); -``` +This query returns all the documents in the **documents** collection. +If you add this below the insertMany example you'll see the document's you've inserted. ### Find Documents with a Query Filter Add a query filter to find only documents which meet the query criteria. ```js -const findDocuments = function(db, callback) { - // Get the documents collection - const collection = db.collection('documents'); - // Find some documents - collection.find({'a': 3}).toArray(function(err, docs) { - assert.equal(err, null); - console.log("Found the following records"); - console.log(docs); - callback(docs); - }); -} +const filteredDocs = await collection.find({ a: 3 }).toArray() +console.log('Found documents filtered by { a: 3 } =>', filteredDocs) ``` Only the documents which match ``'a' : 3`` should be returned. @@ -350,92 +195,19 @@ Only the documents which match ``'a' : 3`` should be returned. The following operation updates a document in the **documents** collection. ```js -const updateDocument = function(db, callback) { - // Get the documents collection - const collection = db.collection('documents'); - // Update document where a is 2, set b equal to 1 - collection.updateOne({ a : 2 } - , { $set: { b : 1 } }, function(err, result) { - assert.equal(err, null); - assert.equal(1, result.result.n); - console.log("Updated the document with the field a equal to 2"); - callback(result); - }); -} +const updateResult = await collection.updateOne({ a: 3 }, { $set: { b: 1 } }) +console.log('Updated documents =>', updateResult) ``` -The method updates the first document where the field **a** is equal to **2** by adding a new field **b** to the document set to **1**. Next, update the callback function from **MongoClient.connect** to include the update method. - -```js -const MongoClient = require('mongodb').MongoClient; -const assert = require('assert'); - -// Connection URL -const url = 'mongodb://localhost:27017'; - -// Database Name -const dbName = 'myproject'; - -// Use connect method to connect to the server -MongoClient.connect(url, function(err, client) { - assert.equal(null, err); - console.log("Connected successfully to server"); - - const db = client.db(dbName); - - insertDocuments(db, function() { - updateDocument(db, function() { - client.close(); - }); - }); -}); -``` +The method updates the first document where the field **a** is equal to **3** by adding a new field **b** to the document set to **1**. `updateResult` contains information about whether there was a matching document to update or not. ### Remove a document Remove the document where the field **a** is equal to **3**. ```js -const removeDocument = function(db, callback) { - // Get the documents collection - const collection = db.collection('documents'); - // Delete document where a is 3 - collection.deleteOne({ a : 3 }, function(err, result) { - assert.equal(err, null); - assert.equal(1, result.result.n); - console.log("Removed the document with the field a equal to 3"); - callback(result); - }); -} -``` - -Add the new method to the **MongoClient.connect** callback function. - -```js -const MongoClient = require('mongodb').MongoClient; -const assert = require('assert'); - -// Connection URL -const url = 'mongodb://localhost:27017'; - -// Database Name -const dbName = 'myproject'; - -// Use connect method to connect to the server -MongoClient.connect(url, function(err, client) { - assert.equal(null, err); - console.log("Connected successfully to server"); - - const db = client.db(dbName); - - insertDocuments(db, function() { - updateDocument(db, function() { - removeDocument(db, function() { - client.close(); - }); - }); - }); -}); +const deleteResult = await collection.deleteMany({ a: 3 }) +console.log('Deleted documents =>', deleteResult) ``` ### Index a Collection @@ -445,55 +217,22 @@ performance. The following function creates an index on the **a** field in the **documents** collection. ```js -const indexCollection = function(db, callback) { - db.collection('documents').createIndex( - { "a": 1 }, - null, - function(err, results) { - console.log(results); - callback(); - } - ); -}; -``` - -Add the ``indexCollection`` method to your app: - -```js -const MongoClient = require('mongodb').MongoClient; -const assert = require('assert'); - -// Connection URL -const url = 'mongodb://localhost:27017'; - -const dbName = 'myproject'; - -// Use connect method to connect to the server -MongoClient.connect(url, function(err, client) { - assert.equal(null, err); - console.log("Connected successfully to server"); - - const db = client.db(dbName); - - insertDocuments(db, function() { - indexCollection(db, function() { - client.close(); - }); - }); -}); +const indexName = await collection.createIndex({a: 1}) +console.log('index name =', indexName) ``` -For more detailed information, see the [tutorials](docs/reference/content/tutorials/main.md). +For more detailed information, see the [indexing strategies page](https://docs.mongodb.com/manual/applications/indexes/). ## Next Steps - * [MongoDB Documentation](http://mongodb.org) - * [Read about Schemas](http://learnmongodbthehardway.com) - * [Star us on GitHub](https://github.com/mongodb/node-mongodb-native) +- [MongoDB Documentation](https://docs.mongodb.com/manual/) +- [MongoDB Node Driver Documentation](https://docs.mongodb.com/drivers/node/) +- [Read about Schemas](https://docs.mongodb.com/manual/core/data-modeling-introduction/) +- [Star us on GitHub](https://github.com/mongodb/node-mongodb-native) ## License [Apache 2.0](LICENSE.md) -© 2009-2012 Christian Amor Kvalheim +© 2009-2012 Christian Amor Kvalheim © 2012-present MongoDB [Contributors](CONTRIBUTORS.md) diff --git a/api-extractor.json b/api-extractor.json new file mode 100644 index 00000000000..bda873c16bf --- /dev/null +++ b/api-extractor.json @@ -0,0 +1,44 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + "mainEntryPointFilePath": "/lib/index.d.ts", + "apiReport": { + "enabled": false + }, + "docModel": { + "enabled": false + }, + "dtsRollup": { + "enabled": true, + "untrimmedFilePath": "", + "publicTrimmedFilePath": "/.d.ts" + }, + "tsdocMetadata": { + "enabled": false + }, + "newlineKind": "lf", + "messages": { + "compilerMessageReporting": { + "default": { + "logLevel": "error" + } + }, + "extractorMessageReporting": { + "default": { + "logLevel": "error" + }, + "ae-internal-missing-underscore": { + "logLevel": "none", + "addToApiReportFile": false + }, + "ae-forgotten-export": { + "logLevel": "error", + "addToApiReportFile": false + } + }, + "tsdocMessageReporting": { + "default": { + "logLevel": "none" + } + } + } +} diff --git a/conf.json b/conf.json deleted file mode 100644 index 18324b38d6e..00000000000 --- a/conf.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "plugins": ["plugins/markdown", "docs/lib/jsdoc/examples_plugin.js", "docs/lib/jsdoc/merge_params.js"], - "source": { - "include": [ - "lib/admin.js", - "lib/aggregation_cursor.js", - "lib/change_stream.js", - "lib/collection.js", - "lib/command_cursor.js", - "lib/cursor.js", - "lib/db.js", - "lib/mongo_client.js", - "lib/bulk/common.js", - "lib/bulk/ordered.js", - "lib/bulk/unordered.js", - "lib/gridfs/grid_store.js", - "lib/gridfs-stream/download.js", - "lib/gridfs-stream/index.js", - "lib/gridfs-stream/upload.js", - "lib/topologies/replset.js", - "lib/topologies/mongos.js", - "lib/topologies/server.js", - "lib/core/error.js", - "lib/core/connection/logger.js", - "lib/core/sessions.js", - "lib/core/transactions.js", - "node_modules/bson/lib/bson/binary.js", - "node_modules/bson/lib/bson/code.js", - "node_modules/bson/lib/bson/db_ref.js", - "node_modules/bson/lib/bson/double.js", - "node_modules/bson/lib/bson/long.js", - "node_modules/bson/lib/bson/objectid.js", - "node_modules/bson/lib/bson/symbol.js", - "node_modules/bson/lib/bson/timestamp.js", - "node_modules/bson/lib/bson/max_key.js", - "node_modules/bson/lib/bson/min_key.js", - "node_modules/bson/lib/bson/decimal128.js", - "node_modules/bson/lib/bson/int_32.js", - "node_modules/bson/lib/bson/regexp.js", - "node_modules/mongodb-client-encryption/lib/autoEncrypter.js", - "node_modules/mongodb-client-encryption/lib/clientEncryption.js", - "node_modules/mongodb-client-encryption/lib/common.js" - ] - }, - "templates": { - "cleverLinks": true, - "monospaceLinks": true, - "default": { - "outputSourceFiles" : true - }, - "applicationName": "Node.js MongoDB Driver API", - "googleAnalytics": "UA-7301842-14", - "openGraph": { - "title": "MongoDB Driver API for Node.js", - "type": "website", - "image": "", - "site_name": "", - "url": "" - }, - "meta": { - "title": "", - "description": "", - "keyword": "" - }, - "linenums": true - }, - "markdown": { - "parser": "gfm", - "hardwrap": true, - "tags": ["examples"] - }, - "examples": { - "indent": 4 - } -} diff --git a/CHANGES_3.0.0.md b/docs/CHANGES_3.0.0.md similarity index 100% rename from CHANGES_3.0.0.md rename to docs/CHANGES_3.0.0.md diff --git a/docs/CHANGES_4.0.0.md b/docs/CHANGES_4.0.0.md new file mode 100644 index 00000000000..deae427c3ac --- /dev/null +++ b/docs/CHANGES_4.0.0.md @@ -0,0 +1,3 @@ +# Changes in 4.x + +WIP diff --git a/docs/Makefile b/docs/Makefile deleted file mode 100644 index f37b1c320c2..00000000000 --- a/docs/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -GIT_BRANCH=`git rev-parse --abbrev-ref HEAD` -USER=`whoami` -URL="https://docs-mongodborg-staging.corp.mongodb.com" -PREFIX=node-mongodb-native - -.PHONY: help stage fake-deploy build-temp lint - -CSS_ERRORS=errors,empty-rules,duplicate-properties,selector-max-approaching -CSS_WARNINGS=regex-selectors,unqualified-attributes,text-indent - -help: - @echo 'Targets' - @echo ' help - Show this help message' - @echo ' stage - Host online for review' - @echo ' fake-deploy - Create a fake deployment in the staging bucket' - @echo ' lint - Check the CSS' - @echo '' - @echo 'Variables' - @echo ' ARGS - Arguments to pass to mut-publish' - -stage: build-temp - mut-publish build/ docs-mongodb-org-staging --prefix=${PREFIX} --stage ${ARGS} - @echo "Hosted at ${URL}/${PREFIX}/${USER}/${GIT_BRANCH}/index.html" diff --git a/docs/build b/docs/build deleted file mode 120000 index 986ba8c3a3e..00000000000 --- a/docs/build +++ /dev/null @@ -1 +0,0 @@ -../public/ \ No newline at end of file diff --git a/docs/guide/connection-settings.txt b/docs/guide/connection-settings.txt deleted file mode 100644 index ff72f8c9f5f..00000000000 --- a/docs/guide/connection-settings.txt +++ /dev/null @@ -1,291 +0,0 @@ -======================= -URI Connection Settings -======================= - -Optional connection settings are settings not covered by the :manual:`URI Connection String `. The following options are passed in the options parameter when you create a mongo client. - -.. code-block:: js - - const { MongoClient } = require('mongodb'); - - // Connection URL - const url = 'mongodb://localhost:50000,localhost:50001'; - - // create a client, passing in additional options - const client = new MongoClient(url, { - poolSize: 10, ssl: true - }); - - // Function to connect to the server and run your code - async function run() { - try { - // Connect the client to the server - await client.connect(); - console.log('Connected successfully to server'); - } finally { - // Ensures that the client will close when you finish/error - await client.close(); - } - } - - // Runs your code - run(); - -The table below shows all settings and what topology they affect. - -.. list-table:: - :header-rows: 1 - - * - Option - - Affects - - Type - - Default - - Description - * - **useNewUrlParser** - - Server, ReplicaSet, Mongos - - boolean - - false - - Opt-in to the new MongoDB URI parser, which conforms to the common cross-driver URI parser specification. The new URI parser will become the only URI parser in the next major version of the driver. - * - **useUnifiedTopology** - - Server, ReplicaSet, Mongos - - boolean - - false - - Opt-in to the new Server Discovery and Monitoring engine that is more stable and aligns with other drivers. This engine will become the only SDAM engine in the next major version of the driver. - * - **validateOptions** - - Server, ReplicaSet, Mongos - - boolean - - false - - If true, the driver will error if it detects an option that it does not recognize. If false, the driver will merely warn. - * - **poolSize** - - Server, ReplicaSet, Mongos - - integer - - 5 - - Is an alias to :manual:`maxPoolSize ` - * - **minSize** - - Server, ReplicaSet, Mongos - - integer - - 0 - - Is an alias to :manual:`maxPoolSize ` - * - **sslValidate** - - Server, ReplicaSet, Mongos - - boolean - - false - - Validate mongod server certificate against ca. Is equivalent to :manual:`tlsInsecure ` - * - **family** - - Server, ReplicaSet, Mongos - - number - - 0 - - Version of IP stack. Can be 4, 6, 0 or null (default). If 0 or null, will attempt to connect with IPv6, and will fall back to IPv4 on failure. - * - **sslCA** - - Server, ReplicaSet, Mongos - - Array - - null - - Array of valid certificates either as Buffers or Strings - * - **sslCert** - - Server, ReplicaSet, Mongos - - Buffer/String - - null - - String or buffer containing the certificate we wish to present - * - **sslKey** - - Server, ReplicaSet, Mongos - - Buffer/String - - null - - String or buffer containing the certificate private key we wish to present - * - **sslPass** - - Server, ReplicaSet, Mongos - - Buffer/String - - null - - String or buffer containing the certificate password - * - **sslCRL** - - Server, ReplicaSet, Mongos - - Buffer[]/Buffer/string[]/string - - null - - Certificate Revocation Lists. See `tls.createSecureContext `_ - * - **checkServerIdentity** - - Server, ReplicaSet, Mongos - - function/boolean - - true - - If a function, overrides built-in `tls.checkServerIdentity `_. See `tls.connect `_. If ``false``, automatically verifies all certificates and servernames. - * - **noDelay** - - Server, ReplicaSet, Mongos - - boolean - - true - - TCP Socket NoDelay option. See `socket.setNoDelay `_ - * - **keepAlive** - - Server, ReplicaSet, Mongos - - integer - - 30000 - - Enables ``keepAlive`` on the TCP socket. See `the first parameter of socket.setKeepAlive `_ - * - **keepAliveInitialDelay** - - Server, ReplicaSet, Mongos - - integer - - 30000 - - The number of milliseconds to wait before initiating keepAlive on the TCP socket. See `the second parameter of socket.setKeepAlive `_ - * - **connectTimeoutMS** - - Server, ReplicaSet, Mongos - - integer - - 30000 - - TCP Connection timeout setting. The same as :manual:`connectTimeoutMS ` - * - **socketTimeoutMS** - - Server, ReplicaSet, Mongos - - integer - - 360000 - - TCP Socket timeout setting. The same as :manual:`socketTimeoutMS ` - * - **acceptableLatencyMS** - - Mongos - - integer - - 15 - - Deprecated alias to :manual:`localThresholdMS ` - * - **w** - - Server, ReplicaSet, Mongos - - string, integer - - null - - The write concern. - * - **wtimeout** - - Server, ReplicaSet, Mongos - - integer - - null - - Deprecated alias to :manual:`wtimeoutMS ` - * - **j** - - Server, ReplicaSet, Mongos - - boolean - - false - - Deprecated alias to :manual:`journal ` - * - **forceServerObjectId** - - Server, ReplicaSet, Mongos - - boolean - - false - - Force server to assign _id values instead of driver. - * - **serializeFunctions** - - Server, ReplicaSet, Mongos - - boolean - - false - - Serialize functions on any object. - * - **ignoreUndefined** - - Server, ReplicaSet, Mongos - - boolean - - false - - Specify if the BSON serializer should ignore undefined fields. - * - **raw** - - Server, ReplicaSet, Mongos - - boolean - - false - - Return document results as raw BSON buffers. - * - **promoteLongs** - - Server, ReplicaSet, Mongos - - boolean - - true - - Promotes Long values to number if they fit inside the 53 bits resolution. - * - **promoteBuffers** - - Server, ReplicaSet, Mongos - - boolean - - false - - Promotes Binary BSON values to native Node Buffers. - * - **promoteValues** - - Server, ReplicaSet, Mongos - - boolean - - true - - Promotes BSON values to native types where possible, set to false to only receive wrapper types. - * - **domainsEnabled** - - Server, ReplicaSet, Mongos - - boolean - - false - - Deprecated. Enable the wrapping of the callback in the current domain, disabled by default to avoid perf hit. - * - **pkFactory** - - Server, ReplicaSet, Mongos - - object - - null - - A primary key factory object for generation of custom _id keys. - * - **promiseLibrary** - - Server, ReplicaSet, Mongos - - object - - null - - A Promise library class the application wishes to use such as Bluebird, must be ES6 compatible. - * - **loggerLevel** - - Server, Replicaset, Mongos - - string - - null - - Specify the log level used by the driver logger (error/warn/info/debug) - * - **logger** - - Server, Replicaset, Mongos - - object - - null - - Specify a customer logger mechanism, can be used to log using your app level logger - -The following options do not work with ``useUnifiedTopology: true`` and are consider deprecated: - - -.. list-table:: - :header-rows: 1 - - * - Option - - Affects - - Type - - Default - - Description - * - **autoReconnect** - - Server - - boolean - - true - - Enables autoReconnecting when using a standalone server in the legacy topology setup - * - **reconnectTries** - - Server - - integer - - 30 - - When ``autoReconnect`` is enabled, the server attempt to reconnect #times. - * - **reconnectInterval** - - Server - - integer - - 1000 - - When ``autoReconnect`` is enabled, the server will wait # milliseconds between retries. - * - **haInterval** - - ReplicaSet, Mongos - - integer - - 10000,5000 - - Time between each replicaset status check. - * - **secondaryAcceptableLatencyMS** - - ReplicaSet - - integer - - 15 - - Sets the range of servers to pick when using NEAREST (lowest ping ms + the latency fence, ex: range of 1 to (1 + 15) ms). - * - **connectWithNoPrimary** - - ReplicaSet - - boolean - - false - - Sets if the driver should connect even if no primary is available. - * - **bufferMaxEntries** - - Server, ReplicaSet, Mongos - - integer - - -1 - - Sets a cap on how many operations the driver will buffer up before giving up on getting a working connection, default is -1 which is unlimited. - - - -Ensure your connection string is valid for Replica Sets -======================================================= - -The connection string passed to the driver must use the fully qualified host names for the servers as set in the replicaset config. Given the following configuration settings for your replicaset. - -.. code-block:: js - - { - _id: 'testSet', - version: 1, - protocolVersion: 1, - members: [ - { - _id: 1, - host: 'server1:31000', - }, - { - _id: 2, - host: 'server2:31001', - }, - { - _id: 3, - host: 'server3:31002', - } - ] - } - -You must ensure ``server1``, ``server2`` and ``server3`` are resolvable from the driver for the Replicaset discovery and failover to work correctly. diff --git a/docs/guide/cursors.txt b/docs/guide/cursors.txt deleted file mode 100644 index f9cf6bdccf4..00000000000 --- a/docs/guide/cursors.txt +++ /dev/null @@ -1,3 +0,0 @@ -======= -Cursors -======= diff --git a/docs/guide/faq.txt b/docs/guide/faq.txt deleted file mode 100644 index 0c774a3b7d9..00000000000 --- a/docs/guide/faq.txt +++ /dev/null @@ -1,198 +0,0 @@ -========================== -Frequently Asked Questions -========================== - -What is the difference between connectTimeoutMS, socketTimeoutMS and maxTimeMS ? --------------------------------------------------------------------------------- - -.. list-table:: - :header-rows: 1 - - * - Setting - - Default Value client.connect - - Description - * - connectTimeoutMS - - 30000 - - The connectTimeoutMS sets the number of milliseconds a socket stays inactive before closing during the connection phase of the driver. That is to say, when the application initiates a connection, when a replica set connects to new members, or when a replica set reconnects to members. A value of 10000 milliseconds would mean the driver would wait up to 10 seconds for a response from a MongoDB server. - * - socketTimeoutMS - - 360000 - - The socketTimeoutMS sets the number of milliseconds a socket stays inactive after the driver has successfully connected before closing. If the value is set to 360000 milliseconds, the socket closes if there is no activity during a 6 minutes window. - * - maxTimeMS - - N/A - - The maxTimeMS setting specifies how long MongoDB should run an operation before cancelling it. If the maxTimeMS is set to 10000 milliseconds, any operation that runs over that limit returns a timeout error. - - -Fail fast during connection -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -In this scenario, the developer wants to ensure that the driver does not -hang during the connection phase or spend an unnecessarily long time -attempting to connect to replica set members who are not reachable. - -As a general rule you should ensure that the ``connectTimeoutMS`` setting -is not lower than the longest network latency you have to a member of -the set. If one of the ``secondary`` members is on the other side of the -planet and has a latency of 10000 milliseconds, setting the -``connectTimeoutMS`` to anything lower will prevent the driver from ever -connecting to that member. - -socketTimeoutMS as a way to abort operations -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Developers sometimes try to use ``socketTimeoutMS`` -to end operations which may run for too long and slow -down the application, but doing so may not achieve the intended result. - -Closing the socket forces a reconnect of the driver's connection pool -and introduces latency to any other operations which are queued up. -Chronically slow operations will therefore cause a large number of -reconnect requests, negatively impacting throughput and performance. - -Also, closing the socket does not terminate the operation; it will continue -to run on the MongoDB server, which could cause data inconsistencies -if the application retries the operation on failure. - -That said, there are some important use cases for ``socketTimeoutMS``. It's -possible that a MongoDB process may error out, or that a misconfigured -firewall may close a socket connection without sending a ``FIN`` packet. -In these cases there is no way for the driver to detect that the -connection has died, and ``socketTimeoutMS`` is essential to ensure that the -sockets are closed correctly. - -A good rule of thumb is to set ``socketTimeoutMS`` to two to three times the -length of the slowest operation which runs through the driver. - -socketTimeoutMS and large connection pools -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Having a large connection pool does not always reduce reconnection -requests. Consider the following example: an application has -a connection pool size of 5 sockets and has ``socketTimeoutMS`` set -to 5000 milliseconds. Operations occur, on average, every 3000 -milliseconds, and reconnection requests are frequent. -Each socket times out after 5000 milliseconds, which means that all -sockets must do something during that 5000 millisecond period to -avoid closing. One message every 3000 milliseconds is not enough to -keep the sockets active, so several of the sockets will time out -after 5000 milliseconds. - -Reducing the pool size to 1 will fix the problem. - -The special meaning of 0 -~~~~~~~~~~~~~~~~~~~~~~~~ - -Setting ``connectTimeoutMS`` and ``socketTimeoutMS`` to the value 0 has -a special meaning. It causes the application to use the operating -system's default socket timeout value. - -maxTimeMS is the option you are looking for -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Many developers set a low ``socketTimeoutMS`` value, intending -to prevent long-running server operations from slowing down -the application. ``maxTimeMS`` is usually a better choice; it allows -MongoDB itself to cancel operations which run for more than ``maxTimeMS`` -milliseconds. - -The following example demonstrates how to use ``MaxTimeMS`` with a ``find`` -operation. - -.. code-block:: js - - // Execute a find command - col.find({"$where": "sleep(100) || true"}) - .maxTimeMS(50) - .count(function(err, count) { - }); - -What does the keepAlive setting do? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -``keepAlive`` is a socket setting available from Node.js that in theory -will keep a socket alive by sending periodic probes to MongoDB. -However, this only works if the operating system supports -``SO_KEEPALIVE``\ , and still might not work if a firewalls -ignores or drops the ``keepAlive`` packets. - -On misconfigured firewalls -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Internal firewalls which exist between application servers and MongoDB -are often misconfigured, and are overly aggressive in their culling of -socket connections. If you experience unexpected network behavior, here -are some things to check: - - -#. The firewall should send a FIN packet when closing a socket, - allowing the driver to detect that the socket is closed. -#. The firewall should allow keepAlive probes. - -I'm getting ECONNRESET when calling client.connect --------------------------------------------------- - -This can occur if the connection pool is too large. - -.. code-block:: js - - const client = new MongoClient('mongodb://localhost:27017/test?maxPoolSize=5000'); - client.connect(function(err) { - // connection - }); - -If this operation causes an ``ECONNRESET`` error, you may have run into -the file descriptor limit for your Node.js process. - -In most operating systems, each socket connection is associated with a -file descriptor. Many operating systems have a limit on how many such -file descriptors can be used by a single process. - -The way to fix the descriptor limit issue is to increase the number of -file descriptors for the Node.js process. On Mac OS and Linux you do -this with the ``ulimit`` shell command. - -.. code-block:: sh - - ulimit -n 6000 - -This sets the maximum number of file descriptors for the process to -6000, allowing Node.js to connect with a pool size of 5000 sockets. - -How can I prevent a slow operation from delaying other operations? ------------------------------------------------------------------- - -.. note:: - The driver is only affected by the slow train operations if the number of slow operations is larger than the max pool size. - - -While Node.js is asynchronous, MongoDB is not. Currently, MongoDB uses a single execution thread per socket. This means that it will only execute a single operation on a socket at any given point in time. Any other operations sent to that socket will have to wait until the current operation is finished. If you have a slow-running operation which holds up other operations, -the best solution is to create a separate connection pool for the slow operation, isolating it from other, faster -operations. - -Ensure your connection string is valid for Replica Set ------------------------------------------------------- - -The connection string passed to the driver **MUST** use the fully qualified host names for the servers as set in the replicaset config. Given the following configuration settings for your replicaset. - -.. code-block:: js - - { - "_id" : "testSet", - "version" : 1, - "protocolVersion" : 1, - "members" : [ - { - "_id" : 1, - "host" : "server1:31000", - }, - { - "_id" : 2, - "host" : "server2:31001", - }, - { - "_id" : 3, - "host" : "server3:31002", - } - ] - } - -You must ensure ``server1``\ , ``server2`` and ``server3`` are resolvable from the driver for the Replicaset discovery and failover to work correctly. diff --git a/docs/guide/includes/.eslintrc b/docs/guide/includes/.eslintrc deleted file mode 100644 index d311875cce9..00000000000 --- a/docs/guide/includes/.eslintrc +++ /dev/null @@ -1,8 +0,0 @@ -{ - "parserOptions": { - "ecmaVersion": 2017, - "ecmaFeatures": { - "impliedStrict": true - } - } -} \ No newline at end of file diff --git a/docs/guide/includes/basic-connection.js b/docs/guide/includes/basic-connection.js deleted file mode 100644 index 6a0dfe84673..00000000000 --- a/docs/guide/includes/basic-connection.js +++ /dev/null @@ -1,22 +0,0 @@ -const { MongoClient } = require('mongodb'); - -// Connection URL -const url = 'mongodb://localhost:27017'; - -// Create a new MongoClient -const client = new MongoClient(url); - -// Function to connect to the server and run your code -async function run() { - try { - // Connect the client to the server - await client.connect(); - console.log('Connected successfully to server'); - } finally { - // Ensures that the client will close when you finish/error - await client.close(); - } -} - -// Runs your code -run(); diff --git a/docs/guide/includes/connect-boilerplate.js b/docs/guide/includes/connect-boilerplate.js deleted file mode 100644 index c52c3360c3e..00000000000 --- a/docs/guide/includes/connect-boilerplate.js +++ /dev/null @@ -1,28 +0,0 @@ -const { MongoClient } = require('mongodb'); - -// Connection URL -const url = 'mongodb://localhost:27017'; - -// Create a new MongoClient -const client = new MongoClient(url); - -async function main() { - // Place your code in this function -} - -// Function to connect to the server and run your code -async function run() { - try { - // Connect the client to the server - await client.connect(); - console.log('Connected successfully to server'); - - await main(client); - } finally { - // Ensures that the client will close when you finish/error - await client.close(); - } -} - -// Runs your code -run(); diff --git a/docs/guide/includes/connect-to-replicaset.js b/docs/guide/includes/connect-to-replicaset.js deleted file mode 100644 index 387d08b9ee7..00000000000 --- a/docs/guide/includes/connect-to-replicaset.js +++ /dev/null @@ -1,22 +0,0 @@ -const { MongoClient } = require('mongodb'); - -// Connection URL -const url = 'mongodb://localhost:27017,localhost:27018/?replicaSet=foo'; - -// Create a new MongoClient -const client = new MongoClient(url); - -// Function to connect to the server and run your code -async function run() { - try { - // Connect the client to the server - await client.connect(); - console.log('Connected successfully to server'); - } finally { - // Ensures that the client will close when you finish/error - await client.close(); - } -} - -// Runs your code -run(); diff --git a/docs/guide/includes/connect-to-sharded-cluster.js b/docs/guide/includes/connect-to-sharded-cluster.js deleted file mode 100644 index a6bad14fc3f..00000000000 --- a/docs/guide/includes/connect-to-sharded-cluster.js +++ /dev/null @@ -1,22 +0,0 @@ -const { MongoClient } = require('mongodb'); - -// Connection URL -const url = 'mongodb://localhost:50000,localhost:50001'; - -// Create a new MongoClient -const client = new MongoClient(url); - -// Function to connect to the server and run your code -async function run() { - try { - // Connect the client to the server - await client.connect(); - console.log('Connected successfully to server'); - } finally { - // Ensures that the client will close when you finish/error - await client.close(); - } -} - -// Runs your code -run(); diff --git a/docs/guide/index.txt b/docs/guide/index.txt deleted file mode 100644 index cab3b23d7bf..00000000000 --- a/docs/guide/index.txt +++ /dev/null @@ -1,53 +0,0 @@ -==================================== -MongoDB Node.js Driver Documentation -==================================== - -Welcome to the MongoDB Node.js driver documentation. - -What's New ----------- - -The :doc:`whats-new` guide explains the major new features of the driver. - -Starting points ---------------- - - -* :doc:`installation-guide` -* :doc:`quick-start` -* :doc:`/tutorials/crud` -* :doc:`/tutorials/connect/connect` - -Next steps ----------- - - -* :doc:`/tutorials/connect/authentication` -* :doc:`/tutorials/gridfs` - -Advanced topics ---------------- - -Advanced features for the driver. - - -* :doc:`tutorials/connect/tls` -* :doc:`management/logging` -* :doc:`management/apm` -* :doc:`management/sdam-monitoring` -* :doc:`faq` - -.. toctree:: - :hidden: - :glob: - - installation-guide - quick-start - whats-new - /tutorials/connect/* - /tutorials/* - /connection-settings - /management/* - /cursors - /faq - /issues-help diff --git a/docs/guide/installation-guide.txt b/docs/guide/installation-guide.txt deleted file mode 100644 index 4f2ce77df1d..00000000000 --- a/docs/guide/installation-guide.txt +++ /dev/null @@ -1,56 +0,0 @@ -================== -Installation Guide -================== - -The recommended way to get started using the Node.js driver is by using ``NPM`` (Node Package Manager) to install the dependency in your project. - -MongoDB Driver --------------- - -After you've created your project with ``npm init`` , you can install the MongoDB driver and its dependencies with the command: - -.. code-block:: sh - - npm install mongodb --save - -This will download the MongoDB driver and add a dependency entry in your ``package.json`` file. - -Troubleshooting ---------------- - -The MongoDB driver depends on several other packages, including: - -* `bson `_ -* `require_optional `_ -* `safe-buffer `_ -* `saslprep `_ - -Additionally, there are multiple optional dependencies that can be installed alongside the driver: - -* `bson-ext `_ -* `kerberos `_ -* `mongodb-client-encryption `_ -* `snappy `_ - -These optional modules are all native C++ extensions. They are optional extensions and are not required for the driver to function. Most of these modules use the `prebuild `_ package to generate pre-built binaries for various operating systems and versions of node. This pre-built version will be downloaded during the ``postinstall`` stage, removing the need to build the native bindings on the system. - -bson-ext Module ---------------- - -The ``bson-ext`` module is an alternative **BSON** parser that is written in C++. If you wish to use the ``bson-ext`` module you will need to add the ``bson-ext`` module to your module's dependencies. - -.. code-block:: sh - - npm install bson-ext --save - -kerberos Module ---------------- - -If you need support for connecting to an LDAP environment, you will need to add the ``kerberos`` module to your module's dependencies. - -.. code-block:: sh - - npm install kerberos --save - -For most versions of node and most operating systems, ``kerberos`` will download a binary generated with ``prebuild``, removing the need to compile the native bindings. If your setup is not included in our pre-built binaries, or if you need to build -kerberos without network access, please see `the kerberos README `_ for instructions on how to build the library manually. diff --git a/docs/guide/issues-help.txt b/docs/guide/issues-help.txt deleted file mode 100644 index 654cb6faf1a..00000000000 --- a/docs/guide/issues-help.txt +++ /dev/null @@ -1,58 +0,0 @@ -============= -Issues & Help -============= - -Our developer community is vibrant and highly engaged, with wide experience using Node.js with MongoDB. -Often, the quickest way to get support for -general questions is through the `mongodb-user google group `_ -or through `stackoverflow `_. - -Refer to our `support channels `_ documentation for more information. - -Bugs / Feature Requests ------------------------ - -To report a bug or to request a new feature in the Node.js driver, -please open a case in our issue management tool, JIRA: - - -* `Create an account and login `_. -* Navigate to `the NODE project `_. -* Click **Create Issue**. Provide as much information as possible about the - issue and the steps to reproduce it. - -Bug reports in JIRA for the Node.js driver and the Core Server (i.e. SERVER) project are **public**. - -If you’ve identified a security vulnerability in a driver or any other -MongoDB project, please report it according to the instructions found in the `Create a Vulnerability Report `_. - -Pull Requests -------------- - -We are happy to accept contributions to help improve the driver. -We will review user contributions to ensure they meet the standards of the codebase. -Pull requests must pass the travis.ci checks as well as include documentation -and tests. - -To get started check out the source and work on a branch: - -.. code-block:: bash - - git clone https://github.com/mongodb/node-mongodb-native.git - cd node-mongodb-native - npm install - git checkout -b myNewFeature - -To run the test suite, you must have a server topology running, and provide the URI to the command. -For example, if you have a single server running at ``"mongodb://localhost:27017"``, you can run the following: - -.. code-block:: bash - - MONGODB_URI="mongodb://localhost:27017" npm test - -Note that, depending on the type of topology that you are running (standalone, replicaset, etc.), different tests will be run. - -.. note:: - - There are many tools that can help you with setting up different topologies for local testing. - Some examples are `mtools `_ and `mongo-orchestration `_. diff --git a/docs/guide/management/apm.txt b/docs/guide/management/apm.txt deleted file mode 100644 index 42225995b36..00000000000 --- a/docs/guide/management/apm.txt +++ /dev/null @@ -1,106 +0,0 @@ -=== -APM -=== - -Application Performance Monitoring support is a driver -feature that allows monitoring services to hook into the -driver in a forward compatible and stable way. The API is -not applied to the driver unless explicitly initialized to -avoid any performance penalties. - -API ---- - -The following code example shows how to enable Command Monitoring - -.. code-block:: js - - const { MongoClient } = require('mongodb'); - - // Connection URL - const url = 'mongodb://localhost:27017'; - - - const client = new MongoClient(url, { - // Enables APM - monitorCommands: true - }); - - client.on('commandStarted', event => { - // command start event (see https://github.com/mongodb/specifications/blob/master/source/command-monitoring/command-monitoring.rst) - }); - - client.on('commandSucceeded', event => { - // command success event (see https://github.com/mongodb/specifications/blob/master/source/command-monitoring/command-monitoring.rst) - }); - - client.on('commandFailed', event => { - // command failure event (see https://github.com/mongodb/specifications/blob/master/source/command-monitoring/command-monitoring.rst) - }); - -Command Monitoring ------------------- - -Command monitoring is based on the cross-driver specification for MongoDB found in the Command monitoring `specification `_. - -The Command monitoring specification is a low-level monitoring specification that sends a notification when a new command is executed against MongoDB and if it fails or succeeds. In most cases this is straightforward and you will receive a single start and either a success or failure event. - -In this example, the user executes the ``isMaster`` command against the server and receives the following messages (full objects are abbreviated for simplicity's sake). When the ``isMaster`` command starts execution we receive the following event (this result is from ``JSON.stringify``\ ; in the real event the connectionId is the actual connection object the command was executed against). - -.. code-block:: js - - { - "command": { - "ismaster": true - }, - "databaseName": "system", - "commandName": "ismaster", - "requestId": 7, - "operationId": 1, - "connectionId": { - "id": 8, - "host": "localhost", - "port": 27017 - } - } - - { - "command": { - "ismaster": 1, - "lsid": { - "id": "+qymQ+CFSySihSWSFC0kWw==" - }, - "$db": "test" - }, - "databaseName": "test", - "commandName": "ismaster", - "requestId": 1, - "connectionId": "localhost:27017" - } - -``requestId`` is the id used for the wire protocol message sent to MongoDB and allows you to correlate the commands executed on MongoDB with the commands from the driver. - -After the command executed successfully it sends the following result: - -.. code-block:: js - - { - "duration": 4.51708, - "commandName": "ismaster", - "reply": { - "ismaster": true, - "maxBsonObjectSize": 16777216, - "maxMessageSizeBytes": 48000000, - "maxWriteBatchSize": 100000, - "localTime": "2019-10-11T21:14:44.793Z", - "logicalSessionTimeoutMinutes": 30, - "minWireVersion": 0, - "maxWireVersion": 7, - "readOnly": false, - "ok": 1 - }, - "requestId": 1, - "connectionId": "localhost:27017" - } - -Notice that the ``requestId`` matches up to the start message, allowing the user of the API to correlate the two events. diff --git a/docs/guide/management/logging.txt b/docs/guide/management/logging.txt deleted file mode 100644 index 446589d1ac1..00000000000 --- a/docs/guide/management/logging.txt +++ /dev/null @@ -1,127 +0,0 @@ -======= -Logging -======= - -You can change the log level, filter on classes to allow only specific classes -to log, and provide your own logger implementation. - -Setting Log level ------------------ - -The driver allows logging at three different levels: ``debug``, -``info`` and ``error``. The default level is ``error``. -The following example demonstrates how to set the logger to ``debug``. - -.. code-block:: js - - const { MongoClient, Logger } = require('mongodb'); - - // Connection URL - const url = 'mongodb://localhost:27017'; - // Database Name - const dbName = 'myproject'; - - const client = new MongoClient(url); - - async function main(client) { - // Set debug level - Logger.setLevel('debug'); - - const db = client.db('myproject'); - - // Execute command { isMaster: true } against db - await db.command({ isMaster: true }); - } - - // Function to connect to the server and run your code - async function run() { - try { - // Connect the client to the server - await client.connect(); - console.log('Connected successfully to server'); - - await main(client); - } finally { - // Ensures that the client will close when you finish/error - await client.close(); - } - } - - // Runs your code - run(); - -Filtering On specific classes ------------------------------ - -You can set the Logger to only log specific class names. The following example -demonstrates how to log only the ``Db`` class. - -.. code-block:: js - - async function main(client) { - // Set debug level - Logger.setLevel('debug'); - // Only log statements on 'Db' class - Logger.filter('class', ['Db']); - - const db = client.db('myproject'); - - // Execute command { isMaster: true } against db - await db.command({ isMaster: true }); - } - -Driver classes available for filtering: - - -* ``Db``\ : The Db instance log statements -* ``Server``\ : A server instance (either standalone, a mongos or replica set member) -* ``ReplSet``\ : Replica set related log statements -* ``Mongos``\ : Mongos related log statements -* ``Cursor``\ : Cursor log statements -* ``Pool``\ : Connection Pool specific log statements -* ``Connection``\ : Singular connection specific log statements -* ``Ping``\ : Replica set ping inquiry log statements - -You can add your own classes to the logger by creating your own logger instances. - -.. code-block:: js - - const { Logger } = require('mongodb'); - - class A { - constructor() { - this.logger = new Logger('A'); - } - - doSomething() { - if (this.logger.isInfo()) { - this.logger.info('logging A', {}); - } - } - } - - // Execute A - const a = new A(); - a.doSomething(); - -Custom logger -------------- - -The following example demonstrates how to define a custom logger. - -.. code-block:: js - - async function main(client) { - // Set debug level - Logger.setLevel('debug'); - - // Set our own logger - Logger.setCurrentLogger(function(msg, context) { - console.log(msg, context); - }); - - const db = client.db('myproject'); - - // Execute command { isMaster: true } against db - await db.command({ isMaster: true }); - } diff --git a/docs/guide/management/sdam-monitoring.txt b/docs/guide/management/sdam-monitoring.txt deleted file mode 100644 index 753f7027ea0..00000000000 --- a/docs/guide/management/sdam-monitoring.txt +++ /dev/null @@ -1,355 +0,0 @@ -=============== -SDAM Monitoring -=============== - -The Node.js driver features SDAM Monitoring events, -allowing an application or tool to monitor changes in the drivers -view of a single server, replica set or ``mongos``. This allows an -application to react to changes of topology, such as a secondary -joining or leaving a replica set. - -Overview of SDAM events ------------------------ - -.. list-table:: - :header-rows: 1 - - * - Event - - Applies To - - Description - * - serverOpening - - Server, Replicaset, Mongos - - Emitted when server connection is established. - * - serverClosed - - Server, Replicaset, Mongos - - Emitted when server connection gets closed. - * - serverDescriptionChanged - - Server, Replicaset, Mongos - - Emitted when server state changes (such as from secondary to primary). - * - topologyOpening - - Server, Replicaset, Mongos - - Emitted before any server connections are performed. - * - topologyClosed - - Server, Replicaset, Mongos - - Emitted when topology connections have all closed. - * - topologyDescriptionChanged - - Replicaset, Mongos - - Emitted when the topology shape changes, such as a new primary being elected or a mongos proxy disconnecting. - * - serverHeartbeatStarted - - Replicaset, Mongos - - Emitted before the ismaster command is issued to a MongoDB server. - * - serverHeartbeatSucceeded - - Replicaset, Mongos - - Emitted after a successful ismaster command was issued to a MongoDB server. - * - serverHeartbeatFailed - - Replicaset, Mongos - - Emitted if a ismaster command failed against a specific MongoDB server. - - -Simple Code Example -------------------- - -The following example demonstrates how to connect to a replica set and monitor all the events that are emitted by the replica set topology. - -.. code-block:: js - - const { MongoClient } = require('mongodb'); - - const url = 'mongodb://localhost:31000,localhost:31001/?replicaSet=rs'; - const client = new MongoClient(url); - - client.on('serverDescriptionChanged', event => { - console.log('received serverDescriptionChanged'); - console.log(JSON.stringify(event, null, 2)); - }); - - client.on('serverHeartbeatStarted', event => { - console.log('received serverHeartbeatStarted'); - console.log(JSON.stringify(event, null, 2)); - }); - - client.on('serverHeartbeatSucceeded', event => { - console.log('received serverHeartbeatSucceeded'); - console.log(JSON.stringify(event, null, 2)); - }); - - client.on('serverHeartbeatFailed', event => { - console.log('received serverHeartbeatFailed'); - console.log(JSON.stringify(event, null, 2)); - }); - - client.on('serverOpening', event => { - console.log('received serverOpening'); - console.log(JSON.stringify(event, null, 2)); - }); - - client.on('serverClosed', event => { - console.log('received serverClosed'); - console.log(JSON.stringify(event, null, 2)); - }); - - client.on('topologyOpening', event => { - console.log('received topologyOpening'); - console.log(JSON.stringify(event, null, 2)); - }); - - client.on('topologyClosed', event => { - console.log('received topologyClosed'); - console.log(JSON.stringify(event, null, 2)); - }); - - client.on('topologyDescriptionChanged', event => { - console.log('received topologyDescriptionChanged'); - console.log(JSON.stringify(event, null, 2)); - }); - - async function run() { - try { - await client.connect(); - console.log('successfully connected'); - } finally { - await client.close(); - } - } - - run(); - -Example Documents Returned For Each Event Type ----------------------------------------------- - -The following examples serve as a guide to the format of the returned documents. - -serverDescriptionChanged -^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: js - - ServerDescriptionChangedEvent { - topologyId: 0, - address: 'localhost:27017', - previousDescription: ServerDescription { - address: 'localhost:27017', - error: null, - roundTripTime: 0, - lastUpdateTime: 1571251089030, - lastWriteDate: null, - opTime: null, - type: 'Unknown', - minWireVersion: 0, - maxWireVersion: 0, - hosts: [], - passives: [], - arbiters: [], - tags: [] - }, - newDescription: ServerDescription { - address: 'localhost:27017', - error: null, - roundTripTime: 0, - lastUpdateTime: 1571251089051, - lastWriteDate: 2019-10-16T18:38:07.000Z, - opTime: { ts: Timestamp, t: 18 }, - type: 'RSPrimary', - minWireVersion: 0, - maxWireVersion: 7, - maxBsonObjectSize: 16777216, - maxMessageSizeBytes: 48000000, - maxWriteBatchSize: 100000, - me: 'localhost:27017', - hosts: [ 'localhost:27017' ], - passives: [], - arbiters: [], - tags: [], - setName: 'rs', - setVersion: 1, - electionId: ObjectID, - primary: 'localhost:27017', - logicalSessionTimeoutMinutes: 30, - '$clusterTime': ClusterTime - } - } - -The ``type`` of the ``ServerDescription`` can be one of the following values: - -.. list-table:: - :header-rows: 1 - - * - Type - - Description - * - Unknown - - Unknown server - * - Standalone - - Standalone server - * - Mongos - - Mongos proxy - * - PossiblePrimary - - Not checked yet, but another server thinks this is a primary - * - RSPrimary - - Primary server - * - RSSecondary - - Secondary server - * - RSArbiter - - Arbiter - * - RSOther - - See `the spec `_ for more details - * - RSGhost - - See `the spec `_ for more details - -serverHeartbeatStarted -^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: js - - ServerHeartbeatStartedEvent { - connectionId: 'localhost:27017' - } - -serverHeartbeatSucceeded -^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: js - - ServerHeartbeatSucceededEvent { - duration: 1.939997, - reply:{ - hosts: [ 'localhost:27017' ], - setName: 'rs', - setVersion: 1, - ismaster: true, - secondary: false, - primary: 'localhost:27017', - me: 'localhost:27017', - electionId: ObjectID, - lastWrite: { - opTime: { ts: [Timestamp], t: 18 }, - lastWriteDate: 2019-10-16T18:38:17.000Z, - majorityOpTime: { ts: [Timestamp], t: 18 }, - majorityWriteDate: 2019-10-16T18:38:17.000Z - }, - maxBsonObjectSize: 16777216, - maxMessageSizeBytes: 48000000, - maxWriteBatchSize: 100000, - localTime: 2019-10-16T18:38:19.589Z, - logicalSessionTimeoutMinutes: 30, - minWireVersion: 0, - maxWireVersion: 7, - readOnly: false, - ok: 1, - operationTime: Timestamp, - '$clusterTime': ClusterTime - }, - connectionId: 'localhost:27017' - } - -serverHeartbeatFailed -^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: js - - ServerHeartbeatFailed { - duration: 20, - failure: MongoError('some error'), - connectionId: 'localhost:27017' - } - -serverOpening -^^^^^^^^^^^^^ - -.. code-block:: js - - ServerOpeningEvent { - topologyId: 0, - address: 'localhost:27017' - } - -serverClosed -^^^^^^^^^^^^ - -.. code-block:: js - - ServerClosedEvent { - topologyId: 0, - address: 'localhost:27017' - } - -topologyOpening -^^^^^^^^^^^^^^^ - -.. code-block:: js - - TopologyOpeningEvent { - topologyId: 0 - } - -topologyClosed -^^^^^^^^^^^^^^ - -.. code-block:: js - - TopologyClosedEvent { - topologyId: 0 - } - -topologyDescriptionChanged -^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: js - - TopologyDescriptionChangedEvent { - topologyId: 0, - previousDescription: TopologyDescription { - type: 'ReplicaSetNoPrimary', - setName: null, - maxSetVersion: null, - maxElectionId: null, - servers: Map { - 'localhost:27017' => ServerDescription - }, - stale: false, - compatible: true, - compatibilityError: null, - logicalSessionTimeoutMinutes: null, - heartbeatFrequencyMS: 10000, - localThresholdMS: 15, - options: Object, - error: undefined, - commonWireVersion: null - }, - newDescription: TopologyDescription { - type: 'ReplicaSetWithPrimary', - setName: 'rs', - maxSetVersion: 1, - maxElectionId: null, - servers: Map { - 'localhost:27017' => ServerDescription - }, - stale: false, - compatible: true, - compatibilityError: null, - logicalSessionTimeoutMinutes: 30, - heartbeatFrequencyMS: 10000, - localThresholdMS: 15, - options: Object, - error: undefined, - commonWireVersion: 7 - } - } - - -The ``type`` field can be one of the following values: - -.. list-table:: - :header-rows: 1 - - * - Type - - Description - * - Single - - A single standalone server - * - ReplicaSetWithPrimary - - Replica set with a primary - * - ReplicaSetNoPrimary - - Replica set with no primary - * - Sharded - - A sharded cluster - * - Unknown - - Unknown topology diff --git a/docs/guide/quick-start.txt b/docs/guide/quick-start.txt deleted file mode 100644 index 36af5f4e84b..00000000000 --- a/docs/guide/quick-start.txt +++ /dev/null @@ -1,327 +0,0 @@ -=========== -Quick Start -=========== -This guide will show you how to set up a simple application using Node.js and MongoDB. Its scope is only how to set up the driver and perform the simple CRUD operations. - -Create the package.json file ----------------------------- - -First, create a directory where your application will live. - -.. code-block:: sh - - mkdir myproject - cd myproject - -Enter the following command and answer the questions to create the initial structure for your new project: - -.. code-block:: sh - - npm init - -Next, install the driver dependency. - -.. code-block:: sh - - npm install mongodb --save - -You should see **NPM** download a lot of files. Once it's done you'll find all the downloaded packages under the **node_modules** directory. - -Start a MongoDB Server ----------------------- - -For complete MongoDB installation instructions, see `the manual `_. - - -#. Download the right MongoDB version from `MongoDB `_ -#. Create a database directory (in this case under **/data**\ ). -#. Install and start a ``mongod`` process. - -.. code-block:: sh - - mongod --dbpath=/data - -You should see the **mongod** process start up and print some status information. - -Connect to MongoDB ------------------- - -Create a new **app.js** file and add the following code to try out some basic CRUD -operations using the MongoDB driver. - -Add code to connect to the server and the database **myproject**\ : - -.. literalinclude:: /includes/basic-connection.js - :language: js - -Run your app from the command line with: - -.. code-block:: sh - - node app.js - -The application should print **Connected successfully to server** to the console. - -Insert a Document ------------------ - -Add to **app.js** the following function which uses the **insertMany** -method to add three documents to the **documents** collection. - -.. code-block:: js - - async function insertDocuments(db) { - // Get the documents collection - const collection = db.collection('documents'); - // Insert some documents - const result = await collection.insertMany([{ a: 1 }, { a: 2 }, { a: 3 }]); - - assert.equal(3, result.result.n); - assert.equal(3, result.ops.length); - console.log('Inserted 3 documents into the collection'); - return result; - } - -The **insert** command returns an object with the following fields: - -* **result** Contains the result document from MongoDB -* **ops** Contains the documents inserted with added **_id** fields -* **connection** Contains the connection used to perform the insert - -Add the ``insertDocuments`` method to your app: - -.. code-block:: js - - const { MongoClient } = require('mongodb'); - const assert = require('assert'); - - // Connection URL - const url = 'mongodb://localhost:27017'; - - // Database Name - const dbName = 'myproject'; - const client = new MongoClient(url, { useNewUrlParser: true }); - - // Use connect method to connect to the server - client.connect().then(async function() { - console.log("Connected successfully to server"); - const db = client.db(dbName); - - try { - await insertDocuments(db); - } finally { - await client.close(); - } - }); - -Run the updated **app.js** file: - -.. code-block:: sh - - node app.js - -The operation returns the following output: - -.. code-block:: sh - - Connected successfully to server - Inserted 3 documents into the collection - -Find All Documents ------------------- - -Add a query that returns all the documents. - -.. code-block:: js - - async function findDocuments(db) { - // Get the documents collection - const collection = db.collection('documents'); - // Find some documents - const docs = await collection.find({}).toArray(); - console.log("Found the following records"); - console.log(docs); - return docs; - } - -This query returns all the documents in the **documents** collection. -Add the ``findDocuments`` method to your app: - -.. code-block:: js - - const { MongoClient } = require('mongodb'); - const assert = require('assert'); - - // Connection URL - const url = 'mongodb://localhost:27017'; - - // Database Name - const dbName = 'myproject'; - const client = new MongoClient(url, { useNewUrlParser: true }); - - // Use connect method to connect to the server - client.connect().then(async function() { - console.log("Connected successfully to server"); - const db = client.db(dbName); - - try { - await insertDocuments(db); - await findDocuments(db); - } finally { - await client.close(); - } - }); - -Find Documents with a Query Filter ----------------------------------- - -Add a query filter to find only documents which meet the query criteria. - -.. code-block:: js - - async function findDocuments(db) { - // Get the documents collection - const collection = db.collection('documents'); - // Find some documents - const docs = await collection.find({'a': 3}).toArray(); - console.log("Found the following records"); - console.log(docs); - return docs; - } - -Only the documents which match ``'a' : 3`` should be returned. - -Update a document ------------------ - -The following operation updates a document in the **documents** collection. - -.. code-block:: js - - async function updateDocuments(db) { - // Get the documents collection - const collection = db.collection('documents'); - // Update document where a is 2, set b equal to 1 - const result = await collection.updateOne({ a : 2 }, { $set: { b : 1 } }); - assert.equal(1, result.result.n); - console.log("Updated the document with the field a equal to 2"); - - return result; - } - -The method updates the first document where the field **a** is equal to **2** by adding a new field **b** to the document set to **1**. -Add the ``updateDocuments`` method to your app: - -.. code-block:: js - - const { MongoClient } = require('mongodb'); - const assert = require('assert'); - - // Connection URL - const url = 'mongodb://localhost:27017'; - - // Database Name - const dbName = 'myproject'; - const client = new MongoClient(url, { useNewUrlParser: true }); - - // Use connect method to connect to the server - client.connect().then(async function() { - console.log("Connected successfully to server"); - const db = client.db(dbName); - - try { - await insertDocuments(db); - await updateDocuments(db); - } finally { - await client.close(); - } - }); - -Remove a document ------------------ - -Remove the document where the field **a** is equal to **3**. - -.. code-block:: js - - async function removeDocument(db) { - // Get the documents collection - const collection = db.collection('documents'); - - // Delete document where a is 3 - const result = await collection.deleteOne({ a : 3 }); - assert.equal(1, result.result.n); - console.log("Removed the document with the field a equal to 3"); - - return result; - } - -Add the ``removeDocument`` method to your app: - -.. code-block:: js - - const { MongoClient } = require('mongodb'); - const assert = require('assert'); - - // Connection URL - const url = 'mongodb://localhost:27017'; - - // Database Name - const dbName = 'myproject'; - const client = new MongoClient(url, { useNewUrlParser: true }); - - // Use connect method to connect to the server - client.connect().then(async function() { - console.log("Connected successfully to server"); - const db = client.db(dbName); - - try { - await insertDocuments(db); - await updateDocuments(db); - await removeDocuments(db); - } finally { - await client.close(); - } - }); - -Index a Collection ------------------- - -`Indexes `_ can improve your application's -performance. The following function creates an index on the **a** field in the -**documents** collection. - -.. code-block:: js - - async function indexCollection(db) { - const results = await db.collection('documents').createIndex({ a: 1 }); - console.log(results); - return results; - } - -Add the ``indexCollection`` method to your app: - -.. code-block:: js - - const { MongoClient } = require('mongodb'); - const assert = require('assert'); - - // Connection URL - const url = 'mongodb://localhost:27017'; - - // Database Name - const dbName = 'myproject'; - const client = new MongoClient(url, { useNewUrlParser: true }); - - // Use connect method to connect to the server - client.connect().then(async function() { - console.log("Connected successfully to server"); - const db = client.db(dbName); - - try { - await insertDocuments(db); - await indexCollection(db); - } finally { - await client.close(); - } - }); diff --git a/docs/guide/tutorials/aggregation.txt b/docs/guide/tutorials/aggregation.txt deleted file mode 100644 index 7a0ba37b309..00000000000 --- a/docs/guide/tutorials/aggregation.txt +++ /dev/null @@ -1,3 +0,0 @@ -=========== -Aggregation -=========== diff --git a/docs/guide/tutorials/collations.txt b/docs/guide/tutorials/collations.txt deleted file mode 100644 index 4fd92e2bc9b..00000000000 --- a/docs/guide/tutorials/collations.txt +++ /dev/null @@ -1,3 +0,0 @@ -========== -Collations -========== diff --git a/docs/guide/tutorials/collections.txt b/docs/guide/tutorials/collections.txt deleted file mode 100644 index c5461ebd7a9..00000000000 --- a/docs/guide/tutorials/collections.txt +++ /dev/null @@ -1,94 +0,0 @@ -=========== -Collections -=========== - -MongoDB stores documents in collections. If a collection does not -exist, MongoDB creates the collection when you first store data for -that collection. - -You can also explicitly create a collection with various options, -such as setting the maximum size or the documentation validation rules. - -Capped Collection ------------------ - -Capped collections have maximum size or document counts that prevent -them from growing beyond maximum thresholds. All capped collections must -specify a maximum size and may also specify a maximum document count. -MongoDB removes older documents if a collection reaches the maximum size -limit before it reaches the maximum document count. - -To create a :manual:`capped collection ` , -use the ``createCollection`` method and specify ``'capped' : true``. - -.. code-block:: js - - const { MongoClient } = require('mongodb'); - - // Connection URL - const url = 'mongodb://localhost:27017'; - - // Create a new MongoClient - const client = new MongoClient(url); - - async function main(client) { - const db = client.db('test'); - await db.createCollection('myCollection', { - capped: true, - size: 100000, - max: 5000 - }); - console.log('Collection created.'); - } - - // Function to connect to the server and run your code - async function run() { - try { - // Connect the client to the server - await client.connect(); - console.log('Connected successfully to server'); - - await main(client); - } finally { - // Ensures that the client will close when you finish/error - await client.close(); - } - } - - // Runs your code - run(); - -Document Validation -------------------- - -Collections with :manual:`validation ` -compare each inserted or updated -document against the criteria specified in the validator option. -Depending on the ``validationLevel`` and ``validationAction``\ , MongoDB -either returns a warning, or refuses to insert or update the document -if it fails to meet the specified criteria. - -The following example creates a ``contacts`` collection with a validator -that specifies that inserted or updated documents should match at -least one of three following conditions: - - -* the ``phone`` field is a string -* the ``email`` field matches the regular expression -* the ``status`` field is either ``Unknown`` or ``Incomplete``. - -.. code-block:: js - - async function main(client) { - const db = client.db('test'); - await db.createCollection('myCollection', { - validator: { - $or: [ - { phone: { $type: 'string' } }, - { email: { $regex: /@mongodb\.com$/ } }, - { status: { $in: ['Unknown', 'Incomplete'] } } - ] - } - }); - console.log('Collection created.'); - } diff --git a/docs/guide/tutorials/commands.txt b/docs/guide/tutorials/commands.txt deleted file mode 100644 index 823ab56206e..00000000000 --- a/docs/guide/tutorials/commands.txt +++ /dev/null @@ -1,44 +0,0 @@ -================= -Database Commands -================= - -Database commands allow you to perform a wide range of diagnostic and administrative -tasks with the Node.js driver. For example, the -:manual:`dbStats ` command returns -storage statistics for a given database. Use the ``command`` function to access -database commands. - -.. code-block:: js - - const { MongoClient } = require('mongodb'); - - // Connection URL - const url = 'mongodb://localhost:27017'; - - // Create a new MongoClient - const client = new MongoClient(url); - - async function main(client) { - const db = client.db('myproject'); - const results = await db.command({ dbStats: 1 }); - console.log(results); - } - - // Function to connect to the server and run your code - async function run() { - try { - // Connect the client to the server - await client.connect(); - console.log('Connected successfully to server'); - - await main(client); - } finally { - // Ensures that the client will close when you finish/error - await client.close(); - } - } - - // Runs your code - run(); - -For a complete list of database commands, see the :manual:`manual ` . diff --git a/docs/guide/tutorials/connect/authentication.txt b/docs/guide/tutorials/connect/authentication.txt deleted file mode 100644 index cc201d300f7..00000000000 --- a/docs/guide/tutorials/connect/authentication.txt +++ /dev/null @@ -1,286 +0,0 @@ -============== -Authentication -============== - -The Node.js driver supports all MongoDB :manual:`authentication mechanisms ` , including those only available in the MongoDB :manual:`Enterprise Edition ` . - -DEFAULT -------- - -To use the default mechanism, either omit the authentication mechanism specification or specify ``DEFAULT`` as the mechanism in the :manual:`URI ConnectionString ` . The driver will attempt to authenticate using the :manual:`SCRAM-SHA-256 authentication ` method if it is available on the MongoDB server. If the server does not support ``SCRAM-SHA-256``, but does support `SCRAM-SHA-1``, the driver will authenticate with ``SCRAM-SHA-1``. If neither ``SCRAM-SHA-256`` or ``SCRAM-SHA-1`` are supported on the server, the driver will authenticate using ``MONGODB-CR`` . - -Include the name and password and the :manual:`authentication database ` (\ ``authSource``\ ) in the connection string. - -In the following example, the connection string specifies the user ``dave``\ , password ``abc123``\ , and authentication mechanism ``DEFAULT``. - -.. important:: - The user and password should always be **URI** encoded using ``encodeURIComponent`` to ensure any non URI compliant user or password characters are correctly parsed. - -.. code-block:: js - - const { MongoClient } = require('mongodb'); - - const user = encodeURIComponent('dave'); - const password = encodeURIComponent('abc123'); - const authMechanism = 'DEFAULT'; - - // Connection URL - const url = `mongodb://${user}:${password}@localhost:27017/?authMechanism=${authMechanism}`; - - // Create a new MongoClient - const client = new MongoClient(url); - - // Function to connect to the server - async function run() { - try { - // Connect the client to the server - await client.connect(); - console.log('Connected successfully to server'); - } finally { - // Ensures that the client will close when you finish/error - await client.close(); - } - } - - // Runs your code - run(); - -SCRAM-SHA-256 -------------- - -.. note:: - ``SCRAM-SHA-256`` is the default authentication method for MongoDB starting in version 4.0 - -To explicitly connect to MongoDB using :manual:`SCRAM-SHA-256 ` , specify ``SCRAM-SHA-256`` as the mechanism in the :manual:`URI ConnectionString ` . - -Include the name and password and the :manual:`authentication database ` (\ ``authSource``\ ) in the connection string. - -In the following example, the connection string specifies the user ``dave``\ , password ``abc123``\ , authentication mechanism ``SCRAM-SHA-256``\ , and authentication database ``myprojectdb`` - -.. code-block:: js - - const { MongoClient } = require('mongodb'); - - // Connection URL - const url = 'mongodb://dave:abc123@localhost:27017/?authMechanism=SCRAM-SHA-256&authSource=myprojectdb'; - - // Create a new MongoClient - const client = new MongoClient(url); - - // Function to connect to the server - async function run() { - try { - // Connect the client to the server - await client.connect(); - console.log('Connected successfully to server'); - } finally { - // Ensures that the client will close when you finish/error - await client.close(); - } - } - - // Runs your code - run(); - -SCRAM-SHA-1 ------------ - -.. note:: - ``SCRAM-SHA-1`` is the default authentication method for MongoDB versions 3.0, 3.2, 3.4, and 3.6. - -To explicitly connect to MongoDB using :manual:`SCRAM-SHA-1 ` , specify ``SCRAM-SHA-1`` as the mechanism in the :manual:`URI ConnectionString ` . - -Include the name and password and the :manual:`authentication database ` (\ ``authSource``\ ) in the connection string. - -In the following example, the connection string specifies the user ``dave``\ , password ``abc123``\ , authentication mechanism ``SCRAM-SHA-1``\ , and authentication database ``myprojectdb`` - -.. code-block:: js - - const { MongoClient } = require('mongodb'); - - // Connection URL - const url = 'mongodb://dave:abc123@localhost:27017/?authMechanism=SCRAM-SHA-1&authSource=myprojectdb'; - - // Create a new MongoClient - const client = new MongoClient(url); - - // Function to connect to the server - async function run() { - try { - // Connect the client to the server - await client.connect(); - console.log('Connected successfully to server'); - } finally { - // Ensures that the client will close when you finish/error - await client.close(); - } - } - - // Runs your code - run(); - -MONGODB-CR ----------- - -.. warning:: - MONGODB-CR was deprecated starting in MongoDB 3.6, and is no longer supported as of MongoDB 4.0 - - -To explicitly connect to MongoDB using ``MONGODB-CR`` , specify ``MONGODB-CR`` as the mechanism in the :manual:`URI ConnectionString ` . - -Include the name and password and the :manual:`authentication database ` (\ ``authSource``\ ) in the connection string. - -In the following example, the connection string specifies the user ``dave``\ , password ``abc123``\ , authentication mechanism ``MONGODB-CR``\ , and authentication database ``myprojectdb``. - -.. code-block:: js - - const { MongoClient } = require('mongodb'); - - // Connection URL - const url = 'mongodb://dave:abc123@localhost:27017/?authMechanism=MONGODB-CR&authSource=myprojectdb'; - - // Create a new MongoClient - const client = new MongoClient(url); - - // Function to connect to the server - async function run() { - try { - // Connect the client to the server - await client.connect(); - console.log('Connected successfully to server'); - } finally { - // Ensures that the client will close when you finish/error - await client.close(); - } - } - - // Runs your code - run(); - -.. important:: - If you have :manual:`upgraded the authentication schema ` from ``MONGODB-CR`` to ``SCRAM-SHA-1``\ , ``MONGODB-CR`` credentials will fail to authenticate. - -X509 ----- - -With :manual:`X.509 ` mechanism, MongoDB uses the X.509 certificate presented during TLS negotiation to authenticate a user whose name is derived from the distinguished name of the X.509 certificate. - -X.509 authentication requires the use of TLS connections with certificate validation and is available in MongoDB 2.6 and newer. - -To connect using the X.509 authentication mechanism, specify ``MONGODB-X509`` as the mechanism in the :manual:`URI ConnectionString ` , ``tls=true``\ , and the username. Use ``enodeURIComponent`` to encode the username string. - -In addition to the connection string, pass to the new ``MongoClient`` a connections options for the ``server`` with the X.509 certificate and other :doc:`TLS/SSL connections ` options. - -.. code-block:: js - - const { MongoClient } = require('mongodb'); - const fs = require('fs'); - - // User name - const userName = encodeURIComponent('CN=client,OU=kerneluser,O=10Gen,L=New York City,ST=New York,C=US'); - const url = `mongodb://${userName}:${password}@server:27017?authMechanism=MONGODB-X509&tls=true`; - - // Create a new MongoClient - const client = new MongoClient(url, { - tlsCertificateKeyFile: `${__dirname}/certs/x509/client.pem`, - }); - - // Function to connect to the server - async function run() { - try { - // Connect the client to the server - await client.connect(); - console.log('Connected successfully to server'); - } finally { - // Ensures that the client will close when you finish/error - await client.close(); - } - } - - // Runs your code - run(); - -For more information on connecting to MongoDB instance, replica set, and sharded cluster with TLS/SSL options, see :doc:`TLS/SSL connections ` . - -For more information, refer to the MongoDB manual -:manual:`X.509 tutorial ` for more information about determining the subject name from the certificate. - -Kerberos (GSSAPI/SSPI) ----------------------- - -`MongoDB Enterprise `_ supports proxy authentication through a Kerberos service. The Node.js driver supports Kerberos on UNIX via the MIT Kerberos library and on Windows via the SSPI API. - -To connect using the GSSAPI authentication mechanism, specify ``authMechanism=GSSAPI`` as the mechanism in the :manual:`URI ConnectionString ` . Specify the user principal and the service name in the connection string. Use ``enodeURIComponent`` to encode the user principal string. - -The following example connects to MongoDB using Kerberos for UNIX. - -.. code-block:: js - - const { MongoClient } = require('mongodb'); - - // KDC Server - const server = 'mongo-server.example.com'; - const principal = 'drivers@KERBEROS.EXAMPLE.COM'; - const urlEncodedPrincipal = encodeURIComponent(principal); - - const url = `mongodb://${urlEncodedPrincipal}@${server}/?authMechanism=GSSAPI&gssapiServiceName=mongodb`; - - const client = new MongoClient(url); - - // Function to connect to the server - async function run() { - try { - // Connect the client to the server - await client.connect(); - console.log('Connected successfully to server'); - } finally { - // Ensures that the client will close when you finish/error - await client.close(); - } - } - - // Runs your code - run(); - -.. note:: - The method refers to the ``GSSAPI`` authentication mechanism instead of ``Kerberos`` because technically the driver authenticates via the :rfc:`GSSAPI <4752>` SASL mechanism. - -LDAP (PLAIN) ------------- - -`MongoDB Enterprise `_ supports proxy authentication through a Lightweight Directory Access Protocol (LDAP) service. - -To connect using the LDAP authentication mechanism, specify ``authMechanism=PLAIN`` as the mechanism in the :manual:`URI ConnectionString ` . - -.. code-block:: js - - const { MongoClient } = require('mongodb'); - - // LDAP Server - const server = 'ldap.example.com'; - const user = 'ldap-user'; - const pass = 'ldap-password'; - - // Url - const url = `mongodb://${user}:${pass}@${server}?authMechanism=PLAIN&maxPoolSize=1`; - - // Client - const client = new MongoClient(url); - - // Function to connect to the server - async function run() { - try { - // Connect the client to the server - await client.connect(); - console.log('Connected successfully to server'); - } finally { - // Ensures that the client will close when you finish/error - await client.close(); - } - } - - // Runs your code - run(); - -.. note:: - The method refers to the ``PLAIN`` authentication mechanism instead of ``LDAP`` because technically the driver authenticates via the :rfc:`PLAIN <4616>` SASL mechanism. diff --git a/docs/guide/tutorials/connect/connect.txt b/docs/guide/tutorials/connect/connect.txt deleted file mode 100644 index 5124083274f..00000000000 --- a/docs/guide/tutorials/connect/connect.txt +++ /dev/null @@ -1,99 +0,0 @@ -================== -Connect to MongoDB -================== - -Use the ``client.connect`` method to connect to a running MongoDB deployment. - -Connect to a Single MongoDB Instance ------------------------------------- - -To connect to a single MongoDB instance, specify the URI of the MongoDB -instance to connect to. - -In the following example, the -:manual:`URI connection string ` -specifies connecting to a MongoDB instance that is running on -``localhost`` using port ``27017``. The ``myproject`` indicates the database -to use. - -.. literalinclude:: /includes/basic-connection.js - :language: js - -For more information on the URI connection string, see -:manual:`URI connection string ` . - -Connect to a Replica Set ------------------------- - -To connect to a :manual:`replica set ` , -include a seedlist of replica set members and the name of the replica set in the -:manual:`URI connection string ` . - -In the following example, the connection string specifies two of the replica set members running on ``localhost:27017`` and ``localhost:27018`` and the name of the replica set (\ ``foo``\ ). - -.. literalinclude:: /includes/connect-to-replicaset.js - :language: js - -For more information on the URI connection string, see -:manual:`URI connection string ` . - -Connect to Sharded Cluster --------------------------- - -To connect to a :manual:`sharded cluster ` , specify the ``mongos`` instance or instances in the :manual:`URI connection string ` . - -In the following example, the connection string specifies the ``mongos`` instances running on ``localhost:50000`` and ``localhost:50001``. - -.. literalinclude:: /includes/connect-to-sharded-cluster.js - :language: js - -For more information on the URI connection string, see -:manual:`URI connection string ` . - -Connection Options ------------------- - -You can specify various connection settings in the :manual:`URI connection string ` . - -For example, you can specify TLS/SSL and authentication setting. - -.. code-block:: js - - const { MongoClient } = require('mongodb'); - const fs = require('fs'); - - // Connection URL - const url = 'mongodb://dave:password@localhost:27017?authMechanism=DEFAULT&authSource=db&tls=true'; - - // Create a client, passing in additional options - const client = new MongoClient(url, { - tlsCAFile: path.resolve(__dirname + '/certs/ca.pem'), - tlsCertificateKeyFile: `${__dirname}/certs/client.pem` - }); - - // Function to connect to the server - async function run() { - try { - // Connect the client to the server - await client.connect(); - console.log('Connected successfully to server'); - } finally { - // Ensures that the client will close when you finish/error - await client.close(); - } - } - - // Runs your code - run(); - - -For more information on connecting with authentication and TSL/SSL, see: - - -* :doc:`Authentication ` : detailed documentation of the various ways to specify authentication credentials -* :doc:`TLS/SSL ` : Detailed documentation of the various ways to specify the properties of an TLS/SSL connection - -For more information on the connection options: - -* :manual:`URI connection string ` : MongoDB connection string URI. -* :doc:`/connection-settings` : Reference on the driver-specific connection settings. diff --git a/docs/guide/tutorials/connect/tls.txt b/docs/guide/tutorials/connect/tls.txt deleted file mode 100644 index a92dc46d18b..00000000000 --- a/docs/guide/tutorials/connect/tls.txt +++ /dev/null @@ -1,159 +0,0 @@ -======= -TLS/SSL -======= - -The Node.js driver supports TLS/SSL connections to MongoDB that support TLS/SSL support. - -No Certificate Validation -------------------------- - -If the MongoDB instance does not perform any validation of the certificate chain, include the ``tls=true`` in the :manual:`URI ConnectionString ` . - -.. code-block:: js - - const { MongoClient } = require('mongodb'); - - // Connection URL - const url = 'mongodb://localhost:27017?tls=true'; - - // Create a new MongoClient - const client = new MongoClient(url); - - // Function to connect to the server and run your code - async function run() { - try { - // Connect the client to the server - await client.connect(); - console.log('Connected successfully to server'); - } finally { - // Ensures that the client will close when you finish/error - await client.close(); - } - } - - // Runs your code - run(); - -Validate Server Certificate ---------------------------- - -If the MongoDB instance presents a certificate, to validate the server's certificate, pass the following when creating a ``MongoClient``\ : - -* A :manual:`URI ConnectionString ` that includes ``tls=true`` setting, - -* A connections options with the certificate for the Certificate Authority (\ ``tlsCAFile``\ ) - -.. code-block:: js - - const { MongoClient } = require('mongodb'); - - const client = new MongoClient('mongodb://localhost:27017?tls=true', { - tlsCAFile: `${__dirname}/certs/ca.pem`) - }); - -Disable Hostname Verification ------------------------------ - -By default, the driver ensures that the hostname included in the -server's TLS certificate(s) matches the hostname(s) provided in the URI connection string. If you need to disable the hostname verification, but otherwise validate the server's certificate, pass to the new ``MongoClient``\ : - - -* - A :manual:`URI ConnectionString ` that includes ``tls=true`` setting, - -* - A connections options with the certificate for the Certificate Authority (\ ``tlsCAFile``\ ) but ``tlsAllowInvalidHostnames`` set to ``true``. - -.. code-block:: js - - const { MongoClient } = require('mongodb'); - - const client = new MongoClient('mongodb://localhost:27017?tls=true', { - tlsCAFile: `${__dirname}/certs/ca.pem`), - tlsAllowInvalidHostnames: true - }); - -Validate Server Certificate and Present Valid Certificate ---------------------------------------------------------- - -If the MongoDB server performs certificate validation, the client must pass its -certificate to the server. To pass the client's certificate as well as to validate the server's certificate, pass to the new ``MongoClient``\ : - - -* - A :manual:`URI ConnectionString ` that includes ``tls=true`` setting, - -* - A connections options with the certificate for the Certificate Authority (\ ``tlsCAFile``\ ), the client's certificate (\ ``tlsCertificateKeyFile``\ ). If the client's key file is encrypted, include the password (\ ``tlsCertificateKeyFilePassword``\ ). - -.. code-block:: js - - const { MongoClient } = require('mongodb'); - const fs = require('fs'); - - const client = new MongoClient('mongodb://localhost:27017?tls=true', { - tlsCAFile: `${__dirname}/certs/ca.pem`), - tlsCertificateKeyFile: `${__dirname}/certs/client.pem`, - tlsCertificateKeyFilePassword: '10gen' - }); - -Connect with X.509 ------------------- - -:manual:`X.509 ` authentication requires the use of TLS/SSL connections with certificate validation. MongoDB uses the X.509 certificate presented during TLS negotiation to authenticate a user whose name is derived from the distinguished name of the X.509 certificate. - -To connect using the X.509 authentication mechanism, specify ``MONGODB-X509`` as the mechanism in the :manual:`URI ConnectionString ` , ``tls=true``\ , and the username. Use ``enodeURIComponent`` to encode the username string. - -In addition to the connection string, pass to the new ``MongoClient`` -a connections options with the X.509 certificate and other :doc:`TLS/SSL connections ` options. - -.. code-block:: js - - const { MongoClient } = require('mongodb'); - - const userName = 'CN=client,OU=kerneluser,O=10Gen,L=New York City,ST=New York,C=US'; - const url = `mongodb://${encodeURIComponent(userName)}@server:27017?authMechanism=MONGODB-X509&tls=true`; - const client = new MongoClient(url, { - tlsCertificateKeyFile: `${__dirname}/certs/x509/client.pem` - }); - -TLS/SSL Options ---------------- - -The following TLS/SSL options are available. - -.. list-table:: - :header-rows: 1 - - * - Parameter - - Type - - Default - - Description - * - ``tls`` - - boolean - - ``false`` - - Use TLS connections. - * - ``tlsInsecure`` - - boolean - - ``false`` - - Relax TLS constraints as much as possible (e.g. allowing invalid certificates or hostname mismatches); drivers must document the exact constraints which are relaxed by this option being true - * - ``tlsCAFile`` - - string[] - - - - Path to file with either a single or bundle of certificate authorities to be considered trusted when making a TLS connection - * - ``tlsCertificateKeyFile`` - - string - - - - Path to the client certificate file or the client private key file; in the case that they both are needed, the files should be concatenated - * - ``tlsCertificateKeyFilePassword`` - - Buffer|string - - - - String or buffer containing the client certificate password. - * - ``tlsAllowInvalidCertificates`` - - boolean - - false - - Specifies whether or not the driver should error when the server’s TLS certificate is invalid - * - ``tlsAllowInvalidHostnames`` - - boolean - - false - - Specifies whether or not the driver should error when there is a mismatch between the server’s hostname and the hostname specified by the TLS certificate diff --git a/docs/guide/tutorials/create-indexes.txt b/docs/guide/tutorials/create-indexes.txt deleted file mode 100644 index 716a4504618..00000000000 --- a/docs/guide/tutorials/create-indexes.txt +++ /dev/null @@ -1,241 +0,0 @@ -============== -Create Indexes -============== - -To create an index on a field or fields, pass an index specification -document to the ``createIndex()`` method: - -.. code-block:: js - - - { : , : ... } - -Create an Ascending Index -------------------------- - -For an ascending index type, specify ``1`` for ````. - -The following example creates an ascending index key for the -``dateOfBirth`` field: - -.. code-block:: js - - async function createAscendingIndex(db) { - // Get the users collection - const collection = db.collection('users'); - - // Create the index - const result = await collection.createIndex({ dateOfBirth : 1 }); - console.log(result); - return result; - }; - -Create a Descending Index -------------------------- - -For an descending index type, specify ``-1`` for ````. - -The following example specifies a descending index key on the -``lastName`` field: - -.. code-block:: js - - async function createDescendingIndex(db) { - // Get the documents collection - const collection = db.collection('users'); - - // Create the index - const result = await collection.createIndex({ lastName : -1 }); - console.log(result); - return result; - }; - -Create a Compound Index ------------------------ - -To specify a compound index, use the ``compoundIndex`` method. - -The following example specifies a compound index key composed of the -``lastName`` field sorted in descending order, followed by the -``dateOfBirth`` field sorted in ascending order: - -.. code-block:: js - - async function createCompoundIndex(db) { - // Get the documents collection - const collection = db.collection('users'); - - // Create the index - const result = await collection.createIndex({ lastName : -1, dateOfBirth : 1 }); - console.log(result); - return result; - }; - -Create a Text Index -------------------- - -MongoDB also provides -:manual:`text ` indexes to -support text search of string content. Text indexes can include any -field whose value is a string or an array of string elements. - -This example specifies a text index key for the ``comments`` field: - -.. code-block:: js - - async function createTextIndex(db) { - // Get the documents collection - const collection = db.collection('users'); - - // Create the index - const result = await collection.createIndex({ comments : "text" }); - console.log(result); - return result; - }; - -Create a Hashed Index ---------------------- - -To specify a :manual:`hashed ` index key, -use the ``hashed`` method. - -This example specifies a hashed index key for the ``timestamp`` field: - -.. code-block:: js - - async function createHashedIndex(db) { - // Get the documents collection - const collection = db.collection('users'); - - // Create the index - const result = await collection.createIndex({ timestamp : "hashed" }); - console.log(result); - return result; - }; - -Create Geospatial Indexes -------------------------- - -There are also helpers for creating the index keys for the various -geospatial indexes supported by mongodb. - -Create a ``2dsphere`` Index -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -To specify a :manual:`2dsphere ` -index key, use one of the ``geo2dsphere`` methods. - -This example specifies a 2dsphere index on the ``location`` field: - -.. code-block:: js - - async function create2dSphereIndex(db) { - // Get the documents collection - const collection = db.collection('users'); - - // Create the index - const result = await collection.createIndex({ location : "2dsphere" }); - console.log(result); - return result; - }; - -Create a ``2d`` Index -^^^^^^^^^^^^^^^^^^^^^^^^^ - -To specify a :manual:`2d ` index key, use the ``geo2d`` -method. - -.. important:: - - A 2d index is for data stored as points on a two-dimensional plane - and is intended for legacy coordinate pairs used in MongoDB 2.2 and - earlier. - - -This example specifies a 2d index on the ``points`` field: - -.. code-block:: js - - async function create2dIndex(db) { - // Get the documents collection - const collection = db.collection('users'); - - // Create the index - const result = await collection.createIndex({ points : "2d" }); - console.log(result); - return result; - }; - -IndexOptions ------------- - -In addition to the index specification document, ``createIndex`` -method can take an index options document, such as to create unique -indexes or partial indexes. - -Create a Unique Index -^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: js - - async function createUniqueIndex(db) { - // Get the documents collection - const collection = db.collection('users'); - - // Create the index - const result = await collection.createIndex( - { lastName : -1, dateOfBirth : 1 }, - { unique:true } - ); - console.log(result); - return result; - }; - -Create a Partial Index -^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: js - - async function createPartialIndex(db) { - // Get the documents collection - const collection = db.collection('users'); - - // Create the index - const result = await collection.createIndex( - { lastName : 1, firstName: 1 }, - { partialFilterExpression: { points: { $gt: 5 } } - }); - console.log(result); - return result; - }; - -For other index options, see :manual:`Index Options ` . - -createIndexes -------------- - -The driver also supports the helper method ``createIndexes``. Unlike ``createIndex``, -``createIndexes`` takes in raw index specifications: - -.. code-block:: js - - async function createMultipleIndexes(db) { - const collection = db.collection('users'); - await collection.createIndexes([ - // Simple index on field firstName - { - key: { firstName: 1 } - }, - // wildcard index - { - key: { '$**': 1 } - }, - // named index on lastName and firstName - { - key: { lastName: 1, firstName: -1 } - name: 'lastNameReverseFirstName' - } - ]); - }); - -You can find more info on raw index specifications :manual:`here ` . diff --git a/docs/guide/tutorials/crud.txt b/docs/guide/tutorials/crud.txt deleted file mode 100644 index 66a2b46096c..00000000000 --- a/docs/guide/tutorials/crud.txt +++ /dev/null @@ -1,3 +0,0 @@ -=============== -CRUD Operations -=============== diff --git a/docs/guide/tutorials/geospatial-search.txt b/docs/guide/tutorials/geospatial-search.txt deleted file mode 100644 index 290aba5a9ae..00000000000 --- a/docs/guide/tutorials/geospatial-search.txt +++ /dev/null @@ -1,108 +0,0 @@ -================= -Geospatial Search -================= - -You can query against :manual:`geospatial indexes ` -in several ways via the Node.js driver, using :manual:`geospatial query operators ` . - -To create a 2dsphere index on a collection, pass a document containing the name of the -field to be indexed with the value '2dsphere' to the ``createIndex()`` method. - -.. code-block:: js - - const { MongoClient } = require('mongodb'); - - // Connection URL - const url = 'mongodb://localhost:27017'; - - // Create a new MongoClient - const client = new MongoClient(url); - - async function main(client) { - const collection = client.db('test').collection('restaurants'); - const result = await collection.createIndex({ 'address.coord' : '2dsphere' }); - console.log(result); - } - - // Function to connect to the server and run your code - async function run() { - try { - // Connect the client to the server - await client.connect(); - console.log('Connected successfully to server'); - - await main(client); - } finally { - // Ensures that the client will close when you finish/error - await client.close(); - } - } - - // Runs your code - run(); - -The following examples assume that a database called ``test`` has a -collection called ``restaurants``\ , with a :manual:`2d sphere index ` -index on the ``address.coord`` field. A -`sample dataset `_ is available for download. - -$near ------ - -The :manual:`$near ` operator specifies -a set of longitude-latitude coordinates and returns documents from nearest to farthest. - -.. code-block:: js - - async function main(client) { - const collection = client.db('test').collection('restaurants'); - const docs = await collection - .find({ - 'address.coord': { - $near: { - $geometry: { - type: 'Point', - coordinates: [ -73.9667, 40.78 ] - }, - $maxDistance: 1000 - } - } - }) - .toArray(); - - console.log('Found the following records'); - console.log(docs); - } - -The ``$maxDistance`` option specifies a maximum distance (in meters) from the given -coordinates. For a complete list of ``$near`` options, see the -:manual:`MongoDB manual ` . - -$geoWithin ----------- - -The :manual:`$geoWithin ` operator -selects documents with geospatial data that exist within a specified shape. - -.. code-block:: js - - async function main(client) { - const collection = client.db('test').collection('restaurants'); - const docs = await collection - .find({ - 'address.coord': { - $geoWithin: { - $geometry: { - type: 'Polygon', - coordinates: [ - [ [ -73, 40 ], [ -74, 41 ], [ -72, 39 ], [ -73, 40 ] ] - ] - } - } - } - }) - .toArray(); - - console.log('Found the following records'); - console.log(docs); - } diff --git a/docs/guide/tutorials/gridfs.txt b/docs/guide/tutorials/gridfs.txt deleted file mode 100644 index e42d87569af..00000000000 --- a/docs/guide/tutorials/gridfs.txt +++ /dev/null @@ -1,210 +0,0 @@ -====== -GridFS -====== - -:manual:`GridFS ` is a specification for storing and -retrieving files that exceed the :manual:`BSON-document size limit ` -of 16 megabytes. - -Instead of storing a file in a single document, GridFS divides a file into parts, or chunks, -and stores each of those chunks as a separate document. By default, GridFS limits chunk size -to 255 kilobytes. GridFS uses two collections to store files: the ``chunks`` collection which -stores the file chunks, and the ``files`` collection that stores the file metadata. - -When you query a GridFS store for a file, the driver or client will reassemble the chunks as -needed. GridFS is useful not only for storing files that exceed 16 megabytes but also for -storing any files which you want to access without having to load the entire file into memory. - -The Node Driver supports GridFS with an api that is compatible with -`Node Streams `_ , so you can ``.pipe()`` -directly from file streams to MongoDB. In this tutorial, you will see how to use the GridFS -streaming API to upload -`a CC-licensed 28 MB recording of the overture from Richard Wagner's opera *Die Meistersinger von Nurnberg* `_ -to MongoDB using streams. - -Uploading a File ----------------- - -You can use GridFS to upload a file to MongoDB. This example -assumes that you have a file named ``meistersinger.mp3`` in the -root directory of your project. You can use whichever file you want, or you -can just download a `\ *Die Meistersinger* Overture mp3 `_. - -In order to use the streaming GridFS API, you first need to create -a ``GridFSBucket``. - -.. code-block:: js - - const { MongoClient, GridFSBucket } = require('mongodb'); - const { createReadStream, createWriteStream } = require('fs'); - const { pipeline } = require('stream'); - const { promisify } = require('util'); - - // Allows us to use async/await with streams - const pipelineAsync = promisify(pipeline); - - const uri = 'mongodb://localhost:27017'; - - const client = new MongoClient(uri); - - async function main(client) { - const db = client.db('test'); - const bucket = new GridFSBucket(db); - } - - // Function to connect to the server and run your code - async function run() { - try { - // Connect the client to the server - await client.connect(); - console.log('Connected successfully to server'); - - await main(client); - } finally { - // Ensures that the client will close when you finish/error - await client.close(); - } - } - - // Runs your code - run(); - - -The bucket has an ``openUploadStream()`` method that creates an upload stream for a given -file name. You can pipe a Node.js ``fs`` read stream to the upload stream. - -.. code-block:: js - - async function main(client) { - const db = client.db('test'); - const bucket = new GridFSBucket(db); - - await pipelineAsync( - createReadStream('./meistersinger.mp3'), - bucket.openUploadStream('meistersinger.mp3') - ); - console.log('done!'); - } - -Assuming that your ``test`` database was empty, you should see that the above -script created 2 collections in your ``test`` database: ``fs.chunks`` and -``fs.files``. The ``fs.files`` collection contains high-level metadata about -the files stored in this bucket. For instance, the file you just uploaded -has a document that looks like what you see below. - -.. code-block:: js - - > db.fs.files.findOne() - { - "_id" : ObjectId("561fc381e81346c82d6397bb"), - "length" : 27847575, - "chunkSize" : 261120, - "uploadDate" : ISODate("2015-10-15T15:17:21.819Z"), - "md5" : "2459f1cdec4d9af39117c3424326d5e5", - "filename" : "meistersinger.mp3" - } - -The above document indicates that the file is named 'meistersinger.mp3', and tells -you its size in bytes, when it was uploaded, and the -`md5 `_ of the contents. There's also a -``chunkSize`` field indicating that the file is -broken up into chunks of size 255 kilobytes, which is the -default. - -.. code-block:: js - - > db.fs.chunks.count() - 107 - -Not surprisingly, 27847575/261120 is approximately 106.64, so the ``fs.chunks`` -collection contains 106 chunks with size 255KB and 1 chunk that's roughly -255KB * 0.64. Each individual chunks document is similar to the document below. - -.. code-block:: js - - > db.fs.chunks.findOne({}, { data: 0 }) - { - "_id" : ObjectId("561fc381e81346c82d6397bc"), - "files_id" : ObjectId("561fc381e81346c82d6397bb"), - "n" : 0 - } - -The chunk document keeps track of which file it belongs to and its order in -the list of chunks. The chunk document also has a ``data`` field that contains -the raw bytes of the file. - -You can configure both the chunk size and the ``fs`` prefix for the files and -chunks collections at the bucket level. For instance, if you specify the -``chunkSizeBytes`` and ``bucketName`` options as shown below, you'll get -27195 chunks in the ``songs.chunks`` collection. - -.. code-block:: js - - async function main(client) { - const db = client.db('test'); - const bucket = new GridFSBucket(db, { - chunkSizeBytes: 1024, - bucketName: 'songs' - }); - - await pipelineAsync( - createReadStream('./meistersinger.mp3'), - bucket.openUploadStream('meistersinger.mp3') - ); - console.log('done!'); - } - -Downloading a File ------------------- - -Congratulations, you've successfully uploaded a file to MongoDB! However, -a file sitting in MongoDB isn't particularly useful. In order to stream the -file to your hard drive, an HTTP response, or to npm modules like -`speaker `_\ , you're going to need -a download stream. The easiest way to get a download stream is -the ``openDownloadStreamByName()`` method. - -.. code-block:: js - - async function main(client) { - const db = client.db('test'); - const bucket = new GridFSBucket(db, { - chunkSizeBytes: 1024, - bucketName: 'songs' - }); - - await pipelineAsync( - bucket.openDownloadStreamByName('meistersinger.mp3'), - createWriteStream('./output.mp3') - ); - console.log('done!'); - } - -Now, you have an ``output.mp3`` file that's a copy of the original -``meistersinger.mp3`` file. The download stream also enables you to do some -neat tricks. For instance, you can cut off the beginning of the song by -specifying a number of bytes to skip. You can cut off the first 41 seconds of -the mp3 and skip right to the good part of the song as shown below. - -.. code-block:: js - - - async function main(client) { - const db = client.db('test'); - const bucket = new GridFSBucket(db, { - chunkSizeBytes: 1024, - bucketName: 'songs' - }); - - await pipelineAsync( - bucket.openDownloadStreamByName('meistersinger.mp3').start(1024 * 1585), - createWriteStream('./output.mp3') - ); - console.log('done!'); - } - -An important point to be aware of regarding performance is that the GridFS -streaming API can't load partial chunks. When a download stream needs to pull a -chunk from MongoDB, it pulls the entire chunk into memory. The 255 kilobyte default -chunk size is usually sufficient, but you can reduce the chunk size to reduce -memory overhead. diff --git a/docs/guide/tutorials/projections.txt b/docs/guide/tutorials/projections.txt deleted file mode 100644 index 9da82ecabcd..00000000000 --- a/docs/guide/tutorials/projections.txt +++ /dev/null @@ -1,98 +0,0 @@ -=========== -Projections -=========== - -By default, queries in MongoDB return all fields in matching -documents. To limit the amount of data that MongoDB sends to -applications, you can include a projection document in the query -operation. - -Projection Document -------------------- - -The projection document limits the fields to return for all -matching documents. The projection document can specify the -inclusion of fields or the exclusion of fields and has the -following form: - -.. code-block:: js - - { field1: , field2: ... } - -```` may be ``0`` (or ``false``\ ) to exclude the field, or -``1`` (or ``true``\ ) to include it. With the exception of the ``_id`` -field, you may not have both inclusions and exclusions in the same -projection document. - -Examples --------- - -The following code example uses the ``restaurants`` sample dataset. - -To return only the ``name``\ , ``cuisine`` and ``_id\ ``fields for documents -which match the query filter, explicitly include the``\ name\ ``and``\ cuisine\ ``fields in the projection document. The``\ _id`` field is -included automatically unless specifically excluded. - -.. code-block:: js - - const { MongoClient } = require('mongodb'); - - // Connection URL - const url = 'mongodb://localhost:27017'; - - // Database Name - const dbName = 'myproject'; - - // Create a new MongoClient - const client = new MongoClient(url); - - async function main(connect) { - const collection = client.db(dbName).collection('restaurants'); - - const docs = await collection - .find({ cuisine : 'Brazilian' }) - .project({ name : 1, cuisine : 1 }) - .toArray(); - - console.log("Found the following records"); - console.log(docs); - } - - // Function to connect to the server and run your code - async function run() { - try { - // Connect the client to the server - await client.connect(); - console.log('Connected successfully to server'); - - await main(client); - } finally { - // Ensures that the client will close when you finish/error - await client.close(); - } - } - - // Runs your code - run(); - -To return ``name`` and ``cuisine`` but exclude all other fields, -including ``_id``, use the following projection document: - -.. code-block:: js - - { name : 1, cuisine : 1, _id: 0 } - -To return all fields *except* the address field, use the following: - -.. code-block:: js - - { address : 0 } - -.. warning:: - Both the MongoDB shell and the 2.x version of the Node driver supported - a syntax that allowed users to pass a projection as a second argument - to the find call: - - ``collection.find({ cuisine : 'Brazilian' }, { name : 1, cuisine : 1 })``. - - **This syntax is not supported in the 3.x version of the driver**. \ No newline at end of file diff --git a/docs/guide/tutorials/text-search.txt b/docs/guide/tutorials/text-search.txt deleted file mode 100644 index ebef8dd95ba..00000000000 --- a/docs/guide/tutorials/text-search.txt +++ /dev/null @@ -1,64 +0,0 @@ -=========== -Text Search -=========== - -Use the :manual:`$text ` -operator to perform text searches on fields which have a -:manual:`text index ` . - -To create a text index on a collection, pass a document containing -the name of the field to be indexed with the value 'text' to the -``createIndex()`` method. - -.. code-block:: js - - const { MongoClient } = require('mongodb'); - - // Connection URL - const url = 'mongodb://localhost:27017'; - - // Create a new MongoClient - const client = new MongoClient(url); - - async function main(client) { - const collection = client.db('myproject').collection('restaurants'); - const results = await collection.createIndex({ name : "text" }); - console.log(results); - } - - // Function to connect to the server and run your code - async function run() { - try { - // Connect the client to the server - await client.connect(); - console.log('Connected successfully to server'); - - await main(client); - } finally { - // Ensures that the client will close when you finish/error - await client.close(); - } - } - - // Runs your code - run(); - -The following example assumes that a database called ``test`` has a -collection called ``restaurants``\ , with a text index on the ``name`` field. - -.. raw::html - - - - -.. code-block:: js - - async function main(client) { - const collection = client.db('myproject').collection('restaurants'); - const docs = await collection.find({ '$text': {'$search' : 'Garden' } } ).toArray(); - console.log("Found the following records"); - console.log(docs); - } - -For more information about the ``$text`` operator and its options, see the -:manual:`manual entry ` . diff --git a/docs/guide/whats-new.txt b/docs/guide/whats-new.txt deleted file mode 100644 index 2dcb2563968..00000000000 --- a/docs/guide/whats-new.txt +++ /dev/null @@ -1,81 +0,0 @@ -========== -What's New -========== - -What's new in 3.3 ------------------ - -* Supports Distributed Transactions -* Supports On-Demand Materialized Views with the $merge operator -* Supports Wildcard Indexes -* Supports Retryable Reads -* Supports MongoDB Query Language Enhancements. -* SRV Polling for Sharded Clusters -* Beta support for MongoDB Client-Side Encryption - -`Full 3.3 Changes Here `_ - -What's new in 3.2 ------------------ - -* Supports new "Unified Topology" for resolving servers (opt in with ``useUnifiedTopology`` option for ``MongoClient``\ ) -* Supports ``session.withTransaction`` helper -* Supports Asynchronous Iteration (\ ``for await...`` syntax) on cursors -* Supports Database-level Aggregations (\ ``db.aggregate(pipeline, options)``\ ) - -`Full 3.2 Changes Here `_ - -What's new in 3.1 ------------------ - -* Support for MongoDB version 4.0 -* Support for Transactions -* Support for authentication with SCRAM-SHA-256 -* Support for new URL parser (opt in with ``useNewUrlParser`` option for ``MongoClient``\ ) - -`Full 3.1 Changes Here `_ - -What's new in 3.0 ------------------ - -* Support added for Retryable Writes -* Support added for DNS Seedlists -* Support added for Change Streams -* Support added for sessions -* ``MongoClient.connect`` now returns a ``Client`` instead of a ``DB``. - -`Full 3.0 Changes Here `_ - -What's New in 2.3 ------------------ - -* Implements `Decimal128 `_\ , a decimal - floating-point numbering format that occupies 16 bytes (128 bits). - See the :doc:`CRUD tutorial ` for an example. - -What's New in 2.2 ------------------ - -* Redesigned Connection Pool. -* Connection close will drain any outstanding operations. -* replicaSet parameter **MUST** be specified if using MongoClient to connect to replicaset, due to SDAM specification implementation. -* Domain support disabled by default, enable with parameter **domainsEnabled** on MongoClient or on the Server/ReplSet/Mongos. - -What's New in 2.1 ------------------ - -* Implements the new GridFS specification -* Implements support for the new 3.2 wire protocol level **find**\ , **getMore** and **killCursor** commands -* A growing/shrinking connection pool -* A worker-based connection pool which minimizes the impact of slow operations on throughput and latency when the number of slow operations is less than the number of connections in the pool -* Topology monitoring specification implementation, allowing applications to monitor the view of the topology as it changes - -What's New in 2.0 ------------------ - -* Adherence to the SDAM (Server Discovery and Monitoring Specification) -* Implementation of the CRUD Specification -* Performance improvements -* New JS-BSON parser which replaces the C++ extension -* A new core driver on top of which you can build alternative or experimental driver APIs -* APM (Application Performance Monitoring) API diff --git a/docs/jsdoc-template/publish.js b/docs/jsdoc-template/publish.js deleted file mode 100644 index 1b621a515bc..00000000000 --- a/docs/jsdoc-template/publish.js +++ /dev/null @@ -1,516 +0,0 @@ -/*global env: true */ -var template = require('jsdoc/template'), - fs = require('jsdoc/fs'), - path = require('jsdoc/path'), - taffy = require('taffydb').taffy, - handle = require('jsdoc/util/error').handle, - helper = require('jsdoc/util/templateHelper'), - _ = require('underscore'), - htmlsafe = helper.htmlsafe, - linkto = helper.linkto, - resolveAuthorLinks = helper.resolveAuthorLinks, - scopeToPunc = helper.scopeToPunc, - hasOwnProp = Object.prototype.hasOwnProperty, - data, - view, - outdir = env.opts.destination; - -function find(spec) { - return helper.find(data, spec); -} - -function tutoriallink(tutorial) { - return helper.toTutorial(tutorial, null, { tag: 'em', classname: 'disabled', prefix: 'Tutorial: ' }); -} - -function getAncestorLinks(doclet) { - return helper.getAncestorLinks(data, doclet); -} - -function hashToLink(doclet, hash) { - if ( !/^(#.+)/.test(hash) ) { return hash; } - - var url = helper.createLink(doclet); - - url = url.replace(/(#.+|$)/, hash); - return '' + hash + ''; -} - -function needsSignature(doclet) { - var needsSig = false; - - // function and class definitions always get a signature - if (doclet.kind === 'function' || doclet.kind === 'class') { - needsSig = true; - } - // typedefs that contain functions get a signature, too - else if (doclet.kind === 'typedef' && doclet.type && doclet.type.names && - doclet.type.names.length) { - for (var i = 0, l = doclet.type.names.length; i < l; i++) { - if (doclet.type.names[i].toLowerCase() === 'function') { - needsSig = true; - break; - } - } - } - - return needsSig; -} - -function addSignatureParams(f) { - var params = helper.getSignatureParams(f, 'optional'); - - f.signature = (f.signature || '') + '('+params.join(', ')+')'; -} - -function addSignatureReturns(f) { - var returnTypes = helper.getSignatureReturns(f); - - f.signature = ''+(f.signature || '') + ''; - - if (returnTypes.length) { - f.signature += ''+(returnTypes.length ? '{'+returnTypes.join('|')+'}' : '')+''; - } -} - -function addSignatureTypes(f) { - var types = helper.getSignatureTypes(f); - - f.signature = (f.signature || '') + ''+(types.length? ' :'+types.join('|') : '')+''; -} - -function addAttribs(f) { - var attribs = helper.getAttribs(f); - - if (attribs.length) { - f.attribs = '' + htmlsafe(attribs.length ? attribs.join(',') : '') + ''; - } -} - -function shortenPaths(files, commonPrefix) { - // always use forward slashes - var regexp = new RegExp('\\\\', 'g'); - - Object.keys(files).forEach(function(file) { - files[file].shortened = files[file].resolved.replace(commonPrefix, '') - .replace(regexp, '/'); - }); - - return files; -} - -function resolveSourcePath(filepath) { - return path.resolve(process.cwd(), filepath); -} - -function getPathFromDoclet(doclet) { - if (!doclet.meta) { - return; - } - - var filepath = doclet.meta.path && doclet.meta.path !== 'null' ? - doclet.meta.path + '/' + doclet.meta.filename : - doclet.meta.filename; - - return filepath; -} - -function generate(title, docs, filename, resolveLinks) { - resolveLinks = resolveLinks === false ? false : true; - - var docData = { - filename: filename, - title: title, - docs: docs - }; - - var outpath = path.join(outdir, filename), - html = view.render('container.tmpl', docData); - - if (resolveLinks) { - html = helper.resolveLinks(html); // turn {@link foo} into foo - } - - fs.writeFileSync(outpath, html, 'utf8'); -} - -function generateSourceFiles(sourceFiles) { - Object.keys(sourceFiles).forEach(function(file) { - var source; - // links are keyed to the shortened path in each doclet's `meta.filename` property - var sourceOutfile = helper.getUniqueFilename(sourceFiles[file].shortened); - helper.registerLink(sourceFiles[file].shortened, sourceOutfile); - - try { - source = { - kind: 'source', - code: helper.htmlsafe( fs.readFileSync(sourceFiles[file].resolved, 'utf8') ) - }; - } - catch(e) { - handle(e); - } - - generate('Source: ' + sourceFiles[file].shortened, [source], sourceOutfile, - false); - }); -} - -/** - * Look for classes or functions with the same name as modules (which indicates that the module - * exports only that class or function), then attach the classes or functions to the `module` - * property of the appropriate module doclets. The name of each class or function is also updated - * for display purposes. This function mutates the original arrays. - * - * @private - * @param {Array.} doclets - The array of classes and functions to - * check. - * @param {Array.} modules - The array of module doclets to search. - */ -function attachModuleSymbols(doclets, modules) { - var symbols = {}; - - // build a lookup table - doclets.forEach(function(symbol) { - symbols[symbol.longname] = symbol; - }); - - return modules.map(function(module) { - if (symbols[module.longname]) { - module.module = symbols[module.longname]; - module.module.name = module.module.name.replace('module:', 'require("') + '")'; - } - }); -} - -/** - * Create the navigation sidebar. - * @param {object} members The members that will be used to create the sidebar. - * @param {array} members.classes - * @param {array} members.externals - * @param {array} members.globals - * @param {array} members.mixins - * @param {array} members.modules - * @param {array} members.namespaces - * @param {array} members.tutorials - * @param {array} members.events - * @return {string} The HTML for the navigation sidebar. - */ -function buildNav(members) { - var nav = []; - - if (members.namespaces.length) { - _.each(members.namespaces, function (v) { - nav.push({ - type: 'namespace', - longname: v.longname, - name: v.name, - members: find({ - kind: 'member', - memberof: v.longname - }), - methods: find({ - kind: 'function', - memberof: v.longname - }), - typedefs: find({ - kind: 'typedef', - memberof: v.longname - }), - events: find({ - kind: 'event', - memberof: v.longname - }) - }); - }); - } - - if (members.classes.length) { - _.each(members.classes, function (v) { - nav.push({ - type: 'class', - longname: v.longname, - name: v.name, - members: find({ - kind: 'member', - memberof: v.longname - }), - methods: find({ - kind: 'function', - memberof: v.longname - }), - typedefs: find({ - kind: 'typedef', - memberof: v.longname - }), - events: find({ - kind: 'event', - memberof: v.longname - }) - }); - }); - } - - return nav; -} - - -/** - @param {TAFFY} taffyData See . - @param {object} opts - @param {Tutorial} tutorials - */ -exports.publish = function(taffyData, opts, tutorials) { - data = taffyData; - - var conf = env.conf.templates || {}; - conf['default'] = conf['default'] || {}; - - var templatePath = opts.template; - view = new template.Template(templatePath + '/tmpl'); - - // claim some special filenames in advance, so the All-Powerful Overseer of Filename Uniqueness - // doesn't try to hand them out later - var indexUrl = helper.getUniqueFilename('index'); - // don't call registerLink() on this one! 'index' is also a valid longname - - var globalUrl = helper.getUniqueFilename('global'); - helper.registerLink('global', globalUrl); - - // set up templating - view.layout = 'layout.tmpl'; - - // set up tutorials for helper - helper.setTutorials(tutorials); - - data = helper.prune(data); - data.sort('longname, version, since'); - helper.addEventListeners(data); - - var sourceFiles = {}; - var sourceFilePaths = []; - data().each(function(doclet) { - doclet.attribs = ''; - - if (doclet.examples) { - doclet.examples = doclet.examples.map(function(example) { - var caption, code; - - if (example.match(/^\s*([\s\S]+?)<\/caption>(\s*[\n\r])([\s\S]+)$/i)) { - caption = RegExp.$1; - code = RegExp.$3; - } - - return { - caption: caption || '', - code: code || example - }; - }); - } - if (doclet.see) { - doclet.see.forEach(function(seeItem, i) { - doclet.see[i] = hashToLink(doclet, seeItem); - }); - } - - // build a list of source files - var sourcePath; - var resolvedSourcePath; - if (doclet.meta) { - sourcePath = getPathFromDoclet(doclet); - resolvedSourcePath = resolveSourcePath(sourcePath); - sourceFiles[sourcePath] = { - resolved: resolvedSourcePath, - shortened: null - }; - sourceFilePaths.push(resolvedSourcePath); - } - }); - - // update outdir if necessary, then create outdir - var packageInfo = ( find({kind: 'package'}) || [] ) [0]; - if (packageInfo && packageInfo.name) { - outdir = path.join(outdir, packageInfo.name, packageInfo.version); - } - fs.mkPath(outdir); - - // copy the template's static files to outdir - var fromDir = path.join(templatePath, 'static'); - var staticFiles = fs.ls(fromDir, 3); - - staticFiles.forEach(function(fileName) { - var toDir = fs.toDir( fileName.replace(fromDir, outdir) ); - fs.mkPath(toDir); - fs.copyFileSync(fileName, toDir); - }); - - // copy user-specified static files to outdir - var staticFilePaths; - var staticFileFilter; - var staticFileScanner; - if (conf['default'].staticFiles) { - staticFilePaths = conf['default'].staticFiles.paths || []; - staticFileFilter = new (require('jsdoc/src/filter')).Filter(conf['default'].staticFiles); - staticFileScanner = new (require('jsdoc/src/scanner')).Scanner(); - - staticFilePaths.forEach(function(filePath) { - var extraStaticFiles = staticFileScanner.scan([filePath], 10, staticFileFilter); - - extraStaticFiles.forEach(function(fileName) { - var sourcePath = fs.statSync(filePath).isDirectory() ? filePath : - path.dirname(filePath); - var toDir = fs.toDir( fileName.replace(sourcePath, outdir) ); - fs.mkPath(toDir); - fs.copyFileSync(fileName, toDir); - }); - }); - } - - if (sourceFilePaths.length) { - sourceFiles = shortenPaths( sourceFiles, path.commonPrefix(sourceFilePaths) ); - } - data().each(function(doclet) { - var url = helper.createLink(doclet); - helper.registerLink(doclet.longname, url); - - // replace the filename with a shortened version of the full path - var docletPath; - if (doclet.meta) { - docletPath = getPathFromDoclet(doclet); - docletPath = sourceFiles[docletPath] ? sourceFiles[docletPath].shortened : null; - if (docletPath) { - doclet.meta.filename = docletPath; - } - } - }); - - data().each(function(doclet) { - var url = helper.longnameToUrl[doclet.longname]; - - if (url.indexOf('#') > -1) { - doclet.id = helper.longnameToUrl[doclet.longname].split(/#/).pop(); - } - else { - doclet.id = doclet.name; - } - - if ( needsSignature(doclet) ) { - addSignatureParams(doclet); - addSignatureReturns(doclet); - addAttribs(doclet); - } - }); - - // do this after the urls have all been generated - data().each(function(doclet) { - doclet.ancestors = getAncestorLinks(doclet); - - if (doclet.kind === 'member') { - addSignatureTypes(doclet); - addAttribs(doclet); - } - - if (doclet.kind === 'constant') { - addSignatureTypes(doclet); - addAttribs(doclet); - doclet.kind = 'member'; - } - }); - - var members = helper.getMembers(data); - members.tutorials = tutorials.children; - - // add template helpers - view.find = find; - view.linkto = linkto; - view.resolveAuthorLinks = resolveAuthorLinks; - view.tutoriallink = tutoriallink; - view.htmlsafe = htmlsafe; - view.members = members; //@davidshimjs: To make navigation for customizing - - // once for all - view.nav = buildNav(members); - attachModuleSymbols( find({ kind: ['class', 'function'], longname: {left: 'module:'} }), - members.modules ); - - // only output pretty-printed source files if requested; do this before generating any other - // pages, so the other pages can link to the source files - if (conf['default'].outputSourceFiles) { - generateSourceFiles(sourceFiles); - } - - if (members.globals.length) { generate('Global', [{kind: 'globalobj'}], globalUrl); } - - // index page displays information from package.json and lists files - var files = find({kind: 'file'}), - packages = find({kind: 'package'}); - - generate('Index', - packages.concat( - [{kind: 'mainpage', readme: opts.readme, longname: (opts.mainpagetitle) ? opts.mainpagetitle : 'Main Page'}] - ).concat(files), - indexUrl); - - // set up the lists that we'll use to generate pages - var classes = taffy(members.classes); - var modules = taffy(members.modules); - var namespaces = taffy(members.namespaces); - var mixins = taffy(members.mixins); - var externals = taffy(members.externals); - - for (var longname in helper.longnameToUrl) { - if ( hasOwnProp.call(helper.longnameToUrl, longname) ) { - var myClasses = helper.find(classes, {longname: longname}); - if (myClasses.length) { - generate('Class: ' + myClasses[0].name, myClasses, helper.longnameToUrl[longname]); - } - - var myModules = helper.find(modules, {longname: longname}); - if (myModules.length) { - generate('Module: ' + myModules[0].name, myModules, helper.longnameToUrl[longname]); - } - - var myNamespaces = helper.find(namespaces, {longname: longname}); - if (myNamespaces.length) { - generate('Namespace: ' + myNamespaces[0].name, myNamespaces, helper.longnameToUrl[longname]); - } - - var myMixins = helper.find(mixins, {longname: longname}); - if (myMixins.length) { - generate('Mixin: ' + myMixins[0].name, myMixins, helper.longnameToUrl[longname]); - } - - var myExternals = helper.find(externals, {longname: longname}); - if (myExternals.length) { - generate('External: ' + myExternals[0].name, myExternals, helper.longnameToUrl[longname]); - } - } - } - - // TODO: move the tutorial functions to templateHelper.js - function generateTutorial(title, tutorial, filename) { - var tutorialData = { - title: title, - header: tutorial.title, - content: tutorial.parse(), - children: tutorial.children - }; - - var tutorialPath = path.join(outdir, filename), - html = view.render('tutorial.tmpl', tutorialData); - - // yes, you can use {@link} in tutorials too! - html = helper.resolveLinks(html); // turn {@link foo} into foo - - fs.writeFileSync(tutorialPath, html, 'utf8'); - } - - // tutorials can have only one parent so there is no risk for loops - function saveChildren(node) { - node.children.forEach(function(child) { - generateTutorial('Tutorial: ' + child.title, child, helper.tutorialToUrl(child.name)); - saveChildren(child); - }); - } - saveChildren(tutorials); -}; diff --git a/docs/jsdoc-template/static/fonts/glyphicons-halflings-regular.eot b/docs/jsdoc-template/static/fonts/glyphicons-halflings-regular.eot deleted file mode 100644 index 423bd5d3a20..00000000000 Binary files a/docs/jsdoc-template/static/fonts/glyphicons-halflings-regular.eot and /dev/null differ diff --git a/docs/jsdoc-template/static/fonts/glyphicons-halflings-regular.svg b/docs/jsdoc-template/static/fonts/glyphicons-halflings-regular.svg deleted file mode 100644 index 44694887478..00000000000 --- a/docs/jsdoc-template/static/fonts/glyphicons-halflings-regular.svg +++ /dev/null @@ -1,229 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/jsdoc-template/static/fonts/glyphicons-halflings-regular.ttf b/docs/jsdoc-template/static/fonts/glyphicons-halflings-regular.ttf deleted file mode 100644 index a498ef4e7c8..00000000000 Binary files a/docs/jsdoc-template/static/fonts/glyphicons-halflings-regular.ttf and /dev/null differ diff --git a/docs/jsdoc-template/static/fonts/glyphicons-halflings-regular.woff b/docs/jsdoc-template/static/fonts/glyphicons-halflings-regular.woff deleted file mode 100644 index d83c539b826..00000000000 Binary files a/docs/jsdoc-template/static/fonts/glyphicons-halflings-regular.woff and /dev/null differ diff --git a/docs/jsdoc-template/static/scripts/bootstrap.min.js b/docs/jsdoc-template/static/scripts/bootstrap.min.js deleted file mode 100644 index 1a6258efcbf..00000000000 --- a/docs/jsdoc-template/static/scripts/bootstrap.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/*! - * Bootstrap v3.0.3 (http://getbootstrap.com) - * Copyright 2013 Twitter, Inc. - * Licensed under http://www.apache.org/licenses/LICENSE-2.0 - */ - -if("undefined"==typeof jQuery)throw new Error("Bootstrap requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]}}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(jQuery),+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){f.trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one(a.support.transition.end,c).emulateTransitionEnd(150):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d)};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(a){var b="disabled",c=this.$element,d=c.is("input")?"val":"html",e=c.data();a+="Text",e.resetText||c.data("resetText",c[d]()),c[d](e[a]||this.options[a]),setTimeout(function(){"loadingText"==a?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},b.prototype.toggle=function(){var a=this.$element.closest('[data-toggle="buttons"]'),b=!0;if(a.length){var c=this.$element.find("input");"radio"===c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?b=!1:a.find(".active").removeClass("active")),b&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}b&&this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition.end&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}this.sliding=!0,f&&this.pause();var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});if(!e.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(j),j.isDefaultPrevented())return;e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid.bs.carousel")},0)}).emulateTransitionEnd(600)}else{if(this.$element.trigger(j),j.isDefaultPrevented())return;d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid.bs.carousel")}return f&&this.cycle(),this}};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?(this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350),void 0):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(jQuery),+function(a){"use strict";function b(){a(d).remove(),a(e).each(function(b){var d=c(a(this));d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown")),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown"))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e="[data-toggle=dropdown]",f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){if("ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(''}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"html":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(c).is("body")?a(window):a(c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#\w/.test(e)&&a(e);return f&&f.length&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parents(".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top()),"function"==typeof h&&(h=f.bottom());var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;this.affixed!==i&&(this.unpin&&this.$element.css("top",""),this.affixed=i,this.unpin="bottom"==i?e.top-d:null,this.$element.removeClass(b.RESET).addClass("affix"+(i?"-"+i:"")),"bottom"==i&&this.$element.offset({top:document.body.offsetHeight-h-this.$element.height()}))}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(jQuery); \ No newline at end of file diff --git a/docs/jsdoc-template/static/scripts/jquery.min.js b/docs/jsdoc-template/static/scripts/jquery.min.js deleted file mode 100644 index 9a85bd34625..00000000000 --- a/docs/jsdoc-template/static/scripts/jquery.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! jQuery v2.0.3 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license -//@ sourceMappingURL=jquery.min.map -*/ -(function(e,undefined){var t,n,r=typeof undefined,i=e.location,o=e.document,s=o.documentElement,a=e.jQuery,u=e.$,l={},c=[],p="2.0.3",f=c.concat,h=c.push,d=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=p.trim,x=function(e,n){return new x.fn.init(e,n,t)},b=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=/\S+/g,T=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,k=/^-ms-/,N=/-([\da-z])/gi,E=function(e,t){return t.toUpperCase()},S=function(){o.removeEventListener("DOMContentLoaded",S,!1),e.removeEventListener("load",S,!1),x.ready()};x.fn=x.prototype={jquery:p,constructor:x,init:function(e,t,n){var r,i;if(!e)return this;if("string"==typeof e){if(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:T.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof x?t[0]:t,x.merge(this,x.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:o,!0)),C.test(r[1])&&x.isPlainObject(t))for(r in t)x.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return i=o.getElementById(r[2]),i&&i.parentNode&&(this.length=1,this[0]=i),this.context=o,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?n.ready(e):(e.selector!==undefined&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return d.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(d.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,t,n,r,i,o,s=arguments[0]||{},a=1,u=arguments.length,l=!1;for("boolean"==typeof s&&(l=s,s=arguments[1]||{},a=2),"object"==typeof s||x.isFunction(s)||(s={}),u===a&&(s=this,--a);u>a;a++)if(null!=(e=arguments[a]))for(t in e)n=s[t],r=e[t],s!==r&&(l&&r&&(x.isPlainObject(r)||(i=x.isArray(r)))?(i?(i=!1,o=n&&x.isArray(n)?n:[]):o=n&&x.isPlainObject(n)?n:{},s[t]=x.extend(l,o,r)):r!==undefined&&(s[t]=r));return s},x.extend({expando:"jQuery"+(p+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=a),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){(e===!0?--x.readyWait:x.isReady)||(x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(o,[x]),x.fn.trigger&&x(o).trigger("ready").off("ready")))},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray,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?l[m.call(e)]||"object":typeof e},isPlainObject:function(e){if("object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!y.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0},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||o;var r=C.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:JSON.parse,parseXML:function(e){var t,n;if(!e||"string"!=typeof e)return null;try{n=new DOMParser,t=n.parseFromString(e,"text/xml")}catch(r){t=undefined}return(!t||t.getElementsByTagName("parsererror").length)&&x.error("Invalid XML: "+e),t},noop:function(){},globalEval:function(e){var t,n=eval;e=x.trim(e),e&&(1===e.indexOf("use strict")?(t=o.createElement("script"),t.text=e,o.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(k,"ms-").replace(N,E)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,s=j(e);if(n){if(s){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(s){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:function(e){return null==e?"":v.call(e)},makeArray:function(e,t){var n=t||[];return null!=e&&(j(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:g.call(t,e,n)},merge:function(e,t){var n=t.length,r=e.length,i=0;if("number"==typeof n)for(;n>i;i++)e[r++]=t[i];else while(t[i]!==undefined)e[r++]=t[i++];return e.length=r,e},grep:function(e,t,n){var r,i=[],o=0,s=e.length;for(n=!!n;s>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,s=j(e),a=[];if(s)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(a[a.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(a[a.length]=r);return f.apply([],a)},guid:1,proxy:function(e,t){var n,r,i;return"string"==typeof t&&(n=e[t],t=e,e=n),x.isFunction(e)?(r=d.call(arguments,2),i=function(){return e.apply(t||this,r.concat(d.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):undefined},access:function(e,t,n,r,i,o,s){var a=0,u=e.length,l=null==n;if("object"===x.type(n)){i=!0;for(a in n)x.access(e,t,a,n[a],!0,o,s)}else if(r!==undefined&&(i=!0,x.isFunction(r)||(s=!0),l&&(s?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(x(e),n)})),t))for(;u>a;a++)t(e[a],n,s?r:r.call(e[a],a,t(e[a],n)));return i?e:l?t.call(e):u?t(e[0],n):o},now:Date.now,swap:function(e,t,n,r){var i,o,s={};for(o in t)s[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=s[o];return i}}),x.ready.promise=function(t){return n||(n=x.Deferred(),"complete"===o.readyState?setTimeout(x.ready):(o.addEventListener("DOMContentLoaded",S,!1),e.addEventListener("load",S,!1))),n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function j(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)}t=x(o),function(e,undefined){var t,n,r,i,o,s,a,u,l,c,p,f,h,d,g,m,y,v="sizzle"+-new Date,b=e.document,w=0,T=0,C=st(),k=st(),N=st(),E=!1,S=function(e,t){return e===t?(E=!0,0):0},j=typeof undefined,D=1<<31,A={}.hasOwnProperty,L=[],q=L.pop,H=L.push,O=L.push,F=L.slice,P=L.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",W="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",$=W.replace("w","w#"),B="\\["+M+"*("+W+")"+M+"*(?:([*^$|!~]?=)"+M+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+$+")|)|)"+M+"*\\]",I=":("+W+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+B.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=RegExp("^"+M+"*,"+M+"*"),X=RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=RegExp(M+"*[+~]"),Y=RegExp("="+M+"*([^\\]'\"]*)"+M+"*\\]","g"),V=RegExp(I),G=RegExp("^"+$+"$"),J={ID:RegExp("^#("+W+")"),CLASS:RegExp("^\\.("+W+")"),TAG:RegExp("^("+W.replace("w","w*")+")"),ATTR:RegExp("^"+B),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:RegExp("^(?:"+R+")$","i"),needsContext:RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Q=/^[^{]+\{\s*\[native \w/,K=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Z=/^(?:input|select|textarea|button)$/i,et=/^h\d$/i,tt=/'|\\/g,nt=RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),rt=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{O.apply(L=F.call(b.childNodes),b.childNodes),L[b.childNodes.length].nodeType}catch(it){O={apply:L.length?function(e,t){H.apply(e,F.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function ot(e,t,r,i){var o,s,a,u,l,f,g,m,x,w;if((t?t.ownerDocument||t:b)!==p&&c(t),t=t||p,r=r||[],!e||"string"!=typeof e)return r;if(1!==(u=t.nodeType)&&9!==u)return[];if(h&&!i){if(o=K.exec(e))if(a=o[1]){if(9===u){if(s=t.getElementById(a),!s||!s.parentNode)return r;if(s.id===a)return r.push(s),r}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(a))&&y(t,s)&&s.id===a)return r.push(s),r}else{if(o[2])return O.apply(r,t.getElementsByTagName(e)),r;if((a=o[3])&&n.getElementsByClassName&&t.getElementsByClassName)return O.apply(r,t.getElementsByClassName(a)),r}if(n.qsa&&(!d||!d.test(e))){if(m=g=v,x=t,w=9===u&&e,1===u&&"object"!==t.nodeName.toLowerCase()){f=gt(e),(g=t.getAttribute("id"))?m=g.replace(tt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",l=f.length;while(l--)f[l]=m+mt(f[l]);x=U.test(e)&&t.parentNode||t,w=f.join(",")}if(w)try{return O.apply(r,x.querySelectorAll(w)),r}catch(T){}finally{g||t.removeAttribute("id")}}}return kt(e.replace(z,"$1"),t,r,i)}function st(){var e=[];function t(n,r){return e.push(n+=" ")>i.cacheLength&&delete t[e.shift()],t[n]=r}return t}function at(e){return e[v]=!0,e}function ut(e){var t=p.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function lt(e,t){var n=e.split("|"),r=e.length;while(r--)i.attrHandle[n[r]]=t}function ct(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 pt(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function ft(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ht(e){return at(function(t){return t=+t,at(function(n,r){var i,o=e([],n.length,t),s=o.length;while(s--)n[i=o[s]]&&(n[i]=!(r[i]=n[i]))})})}s=ot.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},n=ot.support={},c=ot.setDocument=function(e){var t=e?e.ownerDocument||e:b,r=t.defaultView;return t!==p&&9===t.nodeType&&t.documentElement?(p=t,f=t.documentElement,h=!s(t),r&&r.attachEvent&&r!==r.top&&r.attachEvent("onbeforeunload",function(){c()}),n.attributes=ut(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ut(function(e){return e.appendChild(t.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=ut(function(e){return e.innerHTML="
",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),n.getById=ut(function(e){return f.appendChild(e).id=v,!t.getElementsByName||!t.getElementsByName(v).length}),n.getById?(i.find.ID=function(e,t){if(typeof t.getElementById!==j&&h){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},i.filter.ID=function(e){var t=e.replace(nt,rt);return function(e){return e.getAttribute("id")===t}}):(delete i.find.ID,i.filter.ID=function(e){var t=e.replace(nt,rt);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),i.find.TAG=n.getElementsByTagName?function(e,t){return typeof t.getElementsByTagName!==j?t.getElementsByTagName(e):undefined}: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},i.find.CLASS=n.getElementsByClassName&&function(e,t){return typeof t.getElementsByClassName!==j&&h?t.getElementsByClassName(e):undefined},g=[],d=[],(n.qsa=Q.test(t.querySelectorAll))&&(ut(function(e){e.innerHTML="",e.querySelectorAll("[selected]").length||d.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll(":checked").length||d.push(":checked")}),ut(function(e){var n=t.createElement("input");n.setAttribute("type","hidden"),e.appendChild(n).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&d.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||d.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),d.push(",.*:")})),(n.matchesSelector=Q.test(m=f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&ut(function(e){n.disconnectedMatch=m.call(e,"div"),m.call(e,"[s!='']:x"),g.push("!=",I)}),d=d.length&&RegExp(d.join("|")),g=g.length&&RegExp(g.join("|")),y=Q.test(f.contains)||f.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},S=f.compareDocumentPosition?function(e,r){if(e===r)return E=!0,0;var i=r.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(r);return i?1&i||!n.sortDetached&&r.compareDocumentPosition(e)===i?e===t||y(b,e)?-1:r===t||y(b,r)?1:l?P.call(l,e)-P.call(l,r):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,n){var r,i=0,o=e.parentNode,s=n.parentNode,a=[e],u=[n];if(e===n)return E=!0,0;if(!o||!s)return e===t?-1:n===t?1:o?-1:s?1:l?P.call(l,e)-P.call(l,n):0;if(o===s)return ct(e,n);r=e;while(r=r.parentNode)a.unshift(r);r=n;while(r=r.parentNode)u.unshift(r);while(a[i]===u[i])i++;return i?ct(a[i],u[i]):a[i]===b?-1:u[i]===b?1:0},t):p},ot.matches=function(e,t){return ot(e,null,null,t)},ot.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&c(e),t=t.replace(Y,"='$1']"),!(!n.matchesSelector||!h||g&&g.test(t)||d&&d.test(t)))try{var r=m.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(i){}return ot(t,p,null,[e]).length>0},ot.contains=function(e,t){return(e.ownerDocument||e)!==p&&c(e),y(e,t)},ot.attr=function(e,t){(e.ownerDocument||e)!==p&&c(e);var r=i.attrHandle[t.toLowerCase()],o=r&&A.call(i.attrHandle,t.toLowerCase())?r(e,t,!h):undefined;return o===undefined?n.attributes||!h?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null:o},ot.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},ot.uniqueSort=function(e){var t,r=[],i=0,o=0;if(E=!n.detectDuplicates,l=!n.sortStable&&e.slice(0),e.sort(S),E){while(t=e[o++])t===e[o]&&(i=r.push(o));while(i--)e.splice(r[i],1)}return e},o=ot.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+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=o(t);return n},i=ot.selectors={cacheLength:50,createPseudo:at,match:J,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(nt,rt),e[3]=(e[4]||e[5]||"").replace(nt,rt),"~="===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]||ot.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]&&ot.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return J.CHILD.test(e[0])?null:(e[3]&&e[4]!==undefined?e[2]=e[4]:n&&V.test(n)&&(t=gt(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(nt,rt).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=C[e+" "];return t||(t=RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&C(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=ot.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),s="last"!==e.slice(-4),a="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,p,f,h,d,g=o!==s?"nextSibling":"previousSibling",m=t.parentNode,y=a&&t.nodeName.toLowerCase(),x=!u&&!a;if(m){if(o){while(g){p=t;while(p=p[g])if(a?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;d=g="only"===e&&!d&&"nextSibling"}return!0}if(d=[s?m.firstChild:m.lastChild],s&&x){c=m[v]||(m[v]={}),l=c[e]||[],h=l[0]===w&&l[1],f=l[0]===w&&l[2],p=h&&m.childNodes[h];while(p=++h&&p&&p[g]||(f=h=0)||d.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[w,h,f];break}}else if(x&&(l=(t[v]||(t[v]={}))[e])&&l[0]===w)f=l[1];else while(p=++h&&p&&p[g]||(f=h=0)||d.pop())if((a?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(x&&((p[v]||(p[v]={}))[e]=[w,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||ot.error("unsupported pseudo: "+e);return r[v]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?at(function(e,n){var i,o=r(e,t),s=o.length;while(s--)i=P.call(e,o[s]),e[i]=!(n[i]=o[s])}):function(e){return r(e,0,n)}):r}},pseudos:{not:at(function(e){var t=[],n=[],r=a(e.replace(z,"$1"));return r[v]?at(function(e,t,n,i){var o,s=r(e,null,i,[]),a=e.length;while(a--)(o=s[a])&&(e[a]=!(t[a]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:at(function(e){return function(t){return ot(e,t).length>0}}),contains:at(function(e){return function(t){return(t.textContent||t.innerText||o(t)).indexOf(e)>-1}}),lang:at(function(e){return G.test(e||"")||ot.error("unsupported lang: "+e),e=e.replace(nt,rt).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===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.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!i.pseudos.empty(e)},header:function(e){return et.test(e.nodeName)},input:function(e){return Z.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:ht(function(){return[0]}),last:ht(function(e,t){return[t-1]}),eq:ht(function(e,t,n){return[0>n?n+t:n]}),even:ht(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:ht(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:ht(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:ht(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}},i.pseudos.nth=i.pseudos.eq;for(t in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[t]=pt(t);for(t in{submit:!0,reset:!0})i.pseudos[t]=ft(t);function dt(){}dt.prototype=i.filters=i.pseudos,i.setFilters=new dt;function gt(e,t){var n,r,o,s,a,u,l,c=k[e+" "];if(c)return t?0:c.slice(0);a=e,u=[],l=i.preFilter;while(a){(!n||(r=_.exec(a)))&&(r&&(a=a.slice(r[0].length)||a),u.push(o=[])),n=!1,(r=X.exec(a))&&(n=r.shift(),o.push({value:n,type:r[0].replace(z," ")}),a=a.slice(n.length));for(s in i.filter)!(r=J[s].exec(a))||l[s]&&!(r=l[s](r))||(n=r.shift(),o.push({value:n,type:s,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?ot.error(e):k(e,u).slice(0)}function mt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function yt(e,t,n){var i=t.dir,o=n&&"parentNode"===i,s=T++;return t.first?function(t,n,r){while(t=t[i])if(1===t.nodeType||o)return e(t,n,r)}:function(t,n,a){var u,l,c,p=w+" "+s;if(a){while(t=t[i])if((1===t.nodeType||o)&&e(t,n,a))return!0}else while(t=t[i])if(1===t.nodeType||o)if(c=t[v]||(t[v]={}),(l=c[i])&&l[0]===p){if((u=l[1])===!0||u===r)return u===!0}else if(l=c[i]=[p],l[1]=e(t,n,a)||r,l[1]===!0)return!0}}function vt(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 xt(e,t,n,r,i){var o,s=[],a=0,u=e.length,l=null!=t;for(;u>a;a++)(o=e[a])&&(!n||n(o,r,i))&&(s.push(o),l&&t.push(a));return s}function bt(e,t,n,r,i,o){return r&&!r[v]&&(r=bt(r)),i&&!i[v]&&(i=bt(i,o)),at(function(o,s,a,u){var l,c,p,f=[],h=[],d=s.length,g=o||Ct(t||"*",a.nodeType?[a]:a,[]),m=!e||!o&&t?g:xt(g,f,e,a,u),y=n?i||(o?e:d||r)?[]:s:m;if(n&&n(m,y,a,u),r){l=xt(y,h),r(l,[],a,u),c=l.length;while(c--)(p=l[c])&&(y[h[c]]=!(m[h[c]]=p))}if(o){if(i||e){if(i){l=[],c=y.length;while(c--)(p=y[c])&&l.push(m[c]=p);i(null,y=[],l,u)}c=y.length;while(c--)(p=y[c])&&(l=i?P.call(o,p):f[c])>-1&&(o[l]=!(s[l]=p))}}else y=xt(y===s?y.splice(d,y.length):y),i?i(null,s,y,u):O.apply(s,y)})}function wt(e){var t,n,r,o=e.length,s=i.relative[e[0].type],a=s||i.relative[" "],l=s?1:0,c=yt(function(e){return e===t},a,!0),p=yt(function(e){return P.call(t,e)>-1},a,!0),f=[function(e,n,r){return!s&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;o>l;l++)if(n=i.relative[e[l].type])f=[yt(vt(f),n)];else{if(n=i.filter[e[l].type].apply(null,e[l].matches),n[v]){for(r=++l;o>r;r++)if(i.relative[e[r].type])break;return bt(l>1&&vt(f),l>1&&mt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&wt(e.slice(l,r)),o>r&&wt(e=e.slice(r)),o>r&&mt(e))}f.push(n)}return vt(f)}function Tt(e,t){var n=0,o=t.length>0,s=e.length>0,a=function(a,l,c,f,h){var d,g,m,y=[],v=0,x="0",b=a&&[],T=null!=h,C=u,k=a||s&&i.find.TAG("*",h&&l.parentNode||l),N=w+=null==C?1:Math.random()||.1;for(T&&(u=l!==p&&l,r=n);null!=(d=k[x]);x++){if(s&&d){g=0;while(m=e[g++])if(m(d,l,c)){f.push(d);break}T&&(w=N,r=++n)}o&&((d=!m&&d)&&v--,a&&b.push(d))}if(v+=x,o&&x!==v){g=0;while(m=t[g++])m(b,y,l,c);if(a){if(v>0)while(x--)b[x]||y[x]||(y[x]=q.call(f));y=xt(y)}O.apply(f,y),T&&!a&&y.length>0&&v+t.length>1&&ot.uniqueSort(f)}return T&&(w=N,u=C),b};return o?at(a):a}a=ot.compile=function(e,t){var n,r=[],i=[],o=N[e+" "];if(!o){t||(t=gt(e)),n=t.length;while(n--)o=wt(t[n]),o[v]?r.push(o):i.push(o);o=N(e,Tt(i,r))}return o};function Ct(e,t,n){var r=0,i=t.length;for(;i>r;r++)ot(e,t[r],n);return n}function kt(e,t,r,o){var s,u,l,c,p,f=gt(e);if(!o&&1===f.length){if(u=f[0]=f[0].slice(0),u.length>2&&"ID"===(l=u[0]).type&&n.getById&&9===t.nodeType&&h&&i.relative[u[1].type]){if(t=(i.find.ID(l.matches[0].replace(nt,rt),t)||[])[0],!t)return r;e=e.slice(u.shift().value.length)}s=J.needsContext.test(e)?0:u.length;while(s--){if(l=u[s],i.relative[c=l.type])break;if((p=i.find[c])&&(o=p(l.matches[0].replace(nt,rt),U.test(u[0].type)&&t.parentNode||t))){if(u.splice(s,1),e=o.length&&mt(u),!e)return O.apply(r,o),r;break}}}return a(e,f)(o,t,!h,r,U.test(e)),r}n.sortStable=v.split("").sort(S).join("")===v,n.detectDuplicates=E,c(),n.sortDetached=ut(function(e){return 1&e.compareDocumentPosition(p.createElement("div"))}),ut(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||lt("type|href|height|width",function(e,t,n){return n?undefined:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&ut(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||lt("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?undefined:e.defaultValue}),ut(function(e){return null==e.getAttribute("disabled")})||lt(R,function(e,t,n){var r;return n?undefined:(r=e.getAttributeNode(t))&&r.specified?r.value:e[t]===!0?t.toLowerCase():null}),x.find=ot,x.expr=ot.selectors,x.expr[":"]=x.expr.pseudos,x.unique=ot.uniqueSort,x.text=ot.getText,x.isXMLDoc=ot.isXML,x.contains=ot.contains}(e);var D={};function A(e){var t=D[e]={};return x.each(e.match(w)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?D[e]||A(e):x.extend({},e);var t,n,r,i,o,s,a=[],u=!e.once&&[],l=function(p){for(t=e.memory&&p,n=!0,s=i||0,i=0,o=a.length,r=!0;a&&o>s;s++)if(a[s].apply(p[0],p[1])===!1&&e.stopOnFalse){t=!1;break}r=!1,a&&(u?u.length&&l(u.shift()):t?a=[]:c.disable())},c={add:function(){if(a){var n=a.length;(function s(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&c.has(n)||a.push(n):n&&n.length&&"string"!==r&&s(n)})})(arguments),r?o=a.length:t&&(i=n,l(t))}return this},remove:function(){return a&&x.each(arguments,function(e,t){var n;while((n=x.inArray(t,a,n))>-1)a.splice(n,1),r&&(o>=n&&o--,s>=n&&s--)}),this},has:function(e){return e?x.inArray(e,a)>-1:!(!a||!a.length)},empty:function(){return a=[],o=0,this},disable:function(){return a=u=t=undefined,this},disabled:function(){return!a},lock:function(){return u=undefined,t||c.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!a||n&&!u||(t=t||[],t=[e,t.slice?t.slice():t],r?u.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!n}};return c},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 s=o[0],a=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=a&&a.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===r?n.promise():this,a?[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 s=o[2],a=o[3];r[o[1]]=s.add,a&&s.add(function(){n=a},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"]=s.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=d.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),s=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?d.call(arguments):r,n===a?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},a,u,l;if(r>1)for(a=Array(r),u=Array(r),l=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(s(t,l,n)).fail(o.reject).progress(s(t,u,a)):--i;return i||o.resolveWith(l,n),o.promise()}}),x.support=function(t){var n=o.createElement("input"),r=o.createDocumentFragment(),i=o.createElement("div"),s=o.createElement("select"),a=s.appendChild(o.createElement("option"));return n.type?(n.type="checkbox",t.checkOn=""!==n.value,t.optSelected=a.selected,t.reliableMarginRight=!0,t.boxSizingReliable=!0,t.pixelPosition=!1,n.checked=!0,t.noCloneChecked=n.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!a.disabled,n=o.createElement("input"),n.value="t",n.type="radio",t.radioValue="t"===n.value,n.setAttribute("checked","t"),n.setAttribute("name","t"),r.appendChild(n),t.checkClone=r.cloneNode(!0).cloneNode(!0).lastChild.checked,t.focusinBubbles="onfocusin"in e,i.style.backgroundClip="content-box",i.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===i.style.backgroundClip,x(function(){var n,r,s="padding:0;margin:0;border:0;display:block;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box",a=o.getElementsByTagName("body")[0];a&&(n=o.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",a.appendChild(n).appendChild(i),i.innerHTML="",i.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%",x.swap(a,null!=a.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===i.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(i,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(i,null)||{width:"4px"}).width,r=i.appendChild(o.createElement("div")),r.style.cssText=i.style.cssText=s,r.style.marginRight=r.style.width="0",i.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),a.removeChild(n))}),t):t}({});var L,q,H=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,O=/([A-Z])/g;function F(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=x.expando+Math.random()}F.uid=1,F.accepts=function(e){return e.nodeType?1===e.nodeType||9===e.nodeType:!0},F.prototype={key:function(e){if(!F.accepts(e))return 0;var t={},n=e[this.expando];if(!n){n=F.uid++;try{t[this.expando]={value:n},Object.defineProperties(e,t)}catch(r){t[this.expando]=n,x.extend(e,t)}}return this.cache[n]||(this.cache[n]={}),n},set:function(e,t,n){var r,i=this.key(e),o=this.cache[i];if("string"==typeof t)o[t]=n;else if(x.isEmptyObject(o))x.extend(this.cache[i],t);else for(r in t)o[r]=t[r];return o},get:function(e,t){var n=this.cache[this.key(e)];return t===undefined?n:n[t]},access:function(e,t,n){var r;return t===undefined||t&&"string"==typeof t&&n===undefined?(r=this.get(e,t),r!==undefined?r:this.get(e,x.camelCase(t))):(this.set(e,t,n),n!==undefined?n:t)},remove:function(e,t){var n,r,i,o=this.key(e),s=this.cache[o];if(t===undefined)this.cache[o]={};else{x.isArray(t)?r=t.concat(t.map(x.camelCase)):(i=x.camelCase(t),t in s?r=[t,i]:(r=i,r=r in s?[r]:r.match(w)||[])),n=r.length;while(n--)delete s[r[n]]}},hasData:function(e){return!x.isEmptyObject(this.cache[e[this.expando]]||{})},discard:function(e){e[this.expando]&&delete this.cache[e[this.expando]]}},L=new F,q=new F,x.extend({acceptData:F.accepts,hasData:function(e){return L.hasData(e)||q.hasData(e)},data:function(e,t,n){return L.access(e,t,n)},removeData:function(e,t){L.remove(e,t)},_data:function(e,t,n){return q.access(e,t,n)},_removeData:function(e,t){q.remove(e,t)}}),x.fn.extend({data:function(e,t){var n,r,i=this[0],o=0,s=null;if(e===undefined){if(this.length&&(s=L.get(i),1===i.nodeType&&!q.get(i,"hasDataAttrs"))){for(n=i.attributes;n.length>o;o++)r=n[o].name,0===r.indexOf("data-")&&(r=x.camelCase(r.slice(5)),P(i,r,s[r]));q.set(i,"hasDataAttrs",!0)}return s}return"object"==typeof e?this.each(function(){L.set(this,e)}):x.access(this,function(t){var n,r=x.camelCase(e);if(i&&t===undefined){if(n=L.get(i,e),n!==undefined)return n;if(n=L.get(i,r),n!==undefined)return n;if(n=P(i,r,undefined),n!==undefined)return n}else this.each(function(){var n=L.get(this,r);L.set(this,r,t),-1!==e.indexOf("-")&&n!==undefined&&L.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){L.remove(this,e)})}});function P(e,t,n){var r;if(n===undefined&&1===e.nodeType)if(r="data-"+t.replace(O,"-$1").toLowerCase(),n=e.getAttribute(r),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:H.test(n)?JSON.parse(n):n}catch(i){}L.set(e,t,n)}else n=undefined;return n}x.extend({queue:function(e,t,n){var r;return e?(t=(t||"fx")+"queue",r=q.get(e,t),n&&(!r||x.isArray(n)?r=q.access(e,t,x.makeArray(n)):r.push(n)),r||[]):undefined},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),s=function(){x.dequeue(e,t) -};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,s,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return q.get(e,n)||q.access(e,n,{empty:x.Callbacks("once memory").add(function(){q.remove(e,[t+"queue",n])})})}}),x.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),n>arguments.length?x.queue(this[0],e):t===undefined?this:this.each(function(){var n=x.queue(this,e,t);x._queueHooks(this,e),"fx"===e&&"inprogress"!==n[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,t){var n,r=1,i=x.Deferred(),o=this,s=this.length,a=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=undefined),e=e||"fx";while(s--)n=q.get(o[s],e+"queueHooks"),n&&n.empty&&(r++,n.empty.add(a));return a(),i.promise(t)}});var R,M,W=/[\t\r\n\f]/g,$=/\r/g,B=/^(?:input|select|textarea|button)$/i;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 this.each(function(){delete this[x.propFix[e]||e]})},addClass:function(e){var t,n,r,i,o,s=0,a=this.length,u="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];a>s;s++)if(n=this[s],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(W," "):" ")){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,s=0,a=this.length,u=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(u)for(t=(e||"").match(w)||[];a>s;s++)if(n=this[s],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(W," "):"")){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;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):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 t,i=0,o=x(this),s=e.match(w)||[];while(t=s[i++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else(n===r||"boolean"===n)&&(this.className&&q.set(this,"__className__",this.className),this.className=this.className||e===!1?"":q.get(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(W," ").indexOf(t)>=0)return!0;return!1},val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=x.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,x(this).val()):e,null==i?i="":"number"==typeof i?i+="":x.isArray(i)&&(i=x.map(i,function(e){return null==e?"":e+""})),t=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&t.set(this,i,"value")!==undefined||(this.value=i))});if(i)return t=x.valHooks[i.type]||x.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&(n=t.get(i,"value"))!==undefined?n:(n=i.value,"string"==typeof n?n.replace($,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,s=o?null:[],a=o?i+1:r.length,u=0>i?a:o?i:0;for(;a>u;u++)if(n=r[u],!(!n.selected&&u!==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;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),s=i.length;while(s--)r=i[s],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,t,n){var i,o,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===r?x.prop(e,t,n):(1===s&&x.isXMLDoc(e)||(t=t.toLowerCase(),i=x.attrHooks[t]||(x.expr.match.bool.test(t)?M:R)),n===undefined?i&&"get"in i&&null!==(o=i.get(e,t))?o:(o=x.find.attr(e,t),null==o?undefined:o):null!==n?i&&"set"in i&&(o=i.set(e,n,t))!==undefined?o:(e.setAttribute(t,n+""),n):(x.removeAttr(e,t),undefined))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(w);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.bool.test(n)&&(e[r]=!1),e.removeAttribute(n)},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,t,n){var r,i,o,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return o=1!==s||!x.isXMLDoc(e),o&&(t=x.propFix[t]||t,i=x.propHooks[t]),n!==undefined?i&&"set"in i&&(r=i.set(e,n,t))!==undefined?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){return e.hasAttribute("tabindex")||B.test(e.nodeName)||e.href?e.tabIndex:-1}}}}),M={set:function(e,t,n){return t===!1?x.removeAttr(e,n):e.setAttribute(n,n),n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,t){var n=x.expr.attrHandle[t]||x.find.attr;x.expr.attrHandle[t]=function(e,t,r){var i=x.expr.attrHandle[t],o=r?undefined:(x.expr.attrHandle[t]=undefined)!=n(e,t,r)?t.toLowerCase():null;return x.expr.attrHandle[t]=i,o}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&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.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,t){return x.isArray(t)?e.checked=x.inArray(x(e).val(),t)>=0:undefined}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var I=/^key/,z=/^(?:mouse|contextmenu)|click/,_=/^(?:focusinfocus|focusoutblur)$/,X=/^([^.]*)(?:\.(.+)|)$/;function U(){return!0}function Y(){return!1}function V(){try{return o.activeElement}catch(e){}}x.event={global:{},add:function(e,t,n,i,o){var s,a,u,l,c,p,f,h,d,g,m,y=q.get(e);if(y){n.handler&&(s=n,n=s.handler,o=s.selector),n.guid||(n.guid=x.guid++),(l=y.events)||(l=y.events={}),(a=y.handle)||(a=y.handle=function(e){return typeof x===r||e&&x.event.triggered===e.type?undefined:x.event.dispatch.apply(a.elem,arguments)},a.elem=e),t=(t||"").match(w)||[""],c=t.length;while(c--)u=X.exec(t[c])||[],d=m=u[1],g=(u[2]||"").split(".").sort(),d&&(f=x.event.special[d]||{},d=(o?f.delegateType:f.bindType)||d,f=x.event.special[d]||{},p=x.extend({type:d,origType:m,data:i,handler:n,guid:n.guid,selector:o,needsContext:o&&x.expr.match.needsContext.test(o),namespace:g.join(".")},s),(h=l[d])||(h=l[d]=[],h.delegateCount=0,f.setup&&f.setup.call(e,i,g,a)!==!1||e.addEventListener&&e.addEventListener(d,a,!1)),f.add&&(f.add.call(e,p),p.handler.guid||(p.handler.guid=n.guid)),o?h.splice(h.delegateCount++,0,p):h.push(p),x.event.global[d]=!0);e=null}},remove:function(e,t,n,r,i){var o,s,a,u,l,c,p,f,h,d,g,m=q.hasData(e)&&q.get(e);if(m&&(u=m.events)){t=(t||"").match(w)||[""],l=t.length;while(l--)if(a=X.exec(t[l])||[],h=g=a[1],d=(a[2]||"").split(".").sort(),h){p=x.event.special[h]||{},h=(r?p.delegateType:p.bindType)||h,f=u[h]||[],a=a[2]&&RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=f.length;while(o--)c=f[o],!i&&g!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(f.splice(o,1),c.selector&&f.delegateCount--,p.remove&&p.remove.call(e,c));s&&!f.length&&(p.teardown&&p.teardown.call(e,d,m.handle)!==!1||x.removeEvent(e,h,m.handle),delete u[h])}else for(h in u)x.event.remove(e,h+t[l],n,r,!0);x.isEmptyObject(u)&&(delete m.handle,q.remove(e,"events"))}},trigger:function(t,n,r,i){var s,a,u,l,c,p,f,h=[r||o],d=y.call(t,"type")?t.type:t,g=y.call(t,"namespace")?t.namespace.split("."):[];if(a=u=r=r||o,3!==r.nodeType&&8!==r.nodeType&&!_.test(d+x.event.triggered)&&(d.indexOf(".")>=0&&(g=d.split("."),d=g.shift(),g.sort()),c=0>d.indexOf(":")&&"on"+d,t=t[x.expando]?t:new x.Event(d,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=g.join("."),t.namespace_re=t.namespace?RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=undefined,t.target||(t.target=r),n=null==n?[t]:x.makeArray(n,[t]),f=x.event.special[d]||{},i||!f.trigger||f.trigger.apply(r,n)!==!1)){if(!i&&!f.noBubble&&!x.isWindow(r)){for(l=f.delegateType||d,_.test(l+d)||(a=a.parentNode);a;a=a.parentNode)h.push(a),u=a;u===(r.ownerDocument||o)&&h.push(u.defaultView||u.parentWindow||e)}s=0;while((a=h[s++])&&!t.isPropagationStopped())t.type=s>1?l:f.bindType||d,p=(q.get(a,"events")||{})[t.type]&&q.get(a,"handle"),p&&p.apply(a,n),p=c&&a[c],p&&x.acceptData(a)&&p.apply&&p.apply(a,n)===!1&&t.preventDefault();return t.type=d,i||t.isDefaultPrevented()||f._default&&f._default.apply(h.pop(),n)!==!1||!x.acceptData(r)||c&&x.isFunction(r[d])&&!x.isWindow(r)&&(u=r[c],u&&(r[c]=null),x.event.triggered=d,r[d](),x.event.triggered=undefined,u&&(r[c]=u)),t.result}},dispatch:function(e){e=x.event.fix(e);var t,n,r,i,o,s=[],a=d.call(arguments),u=(q.get(this,"events")||{})[e.type]||[],l=x.event.special[e.type]||{};if(a[0]=e,e.delegateTarget=this,!l.preDispatch||l.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),t=0;while((i=s[t++])&&!e.isPropagationStopped()){e.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(o.namespace))&&(e.handleObj=o,e.data=o.data,r=((x.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,a),r!==undefined&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,s=[],a=t.delegateCount,u=e.target;if(a&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!==this;u=u.parentNode||this)if(u.disabled!==!0||"click"!==e.type){for(r=[],n=0;a>n;n++)o=t[n],i=o.selector+" ",r[i]===undefined&&(r[i]=o.needsContext?x(i,this).index(u)>=0:x.find(i,this,null,[u]).length),r[i]&&r.push(o);r.length&&s.push({elem:u,handlers:r})}return t.length>a&&s.push({elem:this,handlers:t.slice(a)}),s},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 offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,r,i,s=t.button;return null==e.pageX&&null!=t.clientX&&(n=e.target.ownerDocument||o,r=n.documentElement,i=n.body,e.pageX=t.clientX+(r&&r.scrollLeft||i&&i.scrollLeft||0)-(r&&r.clientLeft||i&&i.clientLeft||0),e.pageY=t.clientY+(r&&r.scrollTop||i&&i.scrollTop||0)-(r&&r.clientTop||i&&i.clientTop||0)),e.which||s===undefined||(e.which=1&s?1:2&s?3:4&s?2:0),e}},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,s=e,a=this.fixHooks[i];a||(this.fixHooks[i]=a=z.test(i)?this.mouseHooks:I.test(i)?this.keyHooks:{}),r=a.props?this.props.concat(a.props):this.props,e=new x.Event(s),t=r.length;while(t--)n=r[t],e[n]=s[n];return e.target||(e.target=o),3===e.target.nodeType&&(e.target=e.target.parentNode),a.filter?a.filter(e,s):e},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==V()&&this.focus?(this.focus(),!1):undefined},delegateType:"focusin"},blur:{trigger:function(){return this===V()&&this.blur?(this.blur(),!1):undefined},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&x.nodeName(this,"input")?(this.click(),!1):undefined},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==undefined&&(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=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)},x.Event=function(e,t){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.getPreventDefault&&e.getPreventDefault()?U:Y):this.type=e,t&&x.extend(this,t),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,undefined):new x.Event(e,t)},x.Event.prototype={isDefaultPrevented:Y,isPropagationStopped:Y,isImmediatePropagationStopped:Y,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=U,e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=U,e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=U,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.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++&&o.addEventListener(e,r,!0)},teardown:function(){0===--n&&o.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,t,n,r,i){var o,s;if("object"==typeof e){"string"!=typeof t&&(n=n||t,t=undefined);for(s in e)this.on(s,t,n,e[s],i);return this}if(null==n&&null==r?(r=t,n=t=undefined):null==r&&("string"==typeof t?(r=n,n=undefined):(r=n,n=t,t=undefined)),r===!1)r=Y;else if(!r)return this;return 1===i&&(o=r,r=function(e){return x().off(e),o.apply(this,arguments)},r.guid=o.guid||(o.guid=x.guid++)),this.each(function(){x.event.add(this,e,r,n,t)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,x(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return(t===!1||"function"==typeof t)&&(n=t,t=undefined),n===!1&&(n=Y),this.each(function(){x.event.remove(this,e,n,t)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];return n?x.event.trigger(e,t,n,!0):undefined}});var G=/^.[^:#\[\.,]*$/,J=/^(?:parents|prev(?:Until|All))/,Q=x.expr.match.needsContext,K={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=x(e,this),n=t.length;return this.filter(function(){var e=0;for(;n>e;e++)if(x.contains(this,t[e]))return!0})},not:function(e){return this.pushStack(et(this,e||[],!0))},filter:function(e){return this.pushStack(et(this,e||[],!1))},is:function(e){return!!et(this,"string"==typeof e&&Q.test(e)?x(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,o=[],s=Q.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&&(s?s.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?g.call(x(e),this[0]):g.call(this,e.jquery?e[0]:e):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 Z(e,t){while((e=e[t])&&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 Z(e,"nextSibling")},prev:function(e){return Z(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 e.contentDocument||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&&(K[e]||x.unique(i),J.test(e)&&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,t,n){var r=[],i=n!==undefined;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&x(e).is(n))break;r.push(e)}return r},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function et(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(G.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return g.call(t,e)>=0!==n})}var tt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,nt=/<([\w:]+)/,rt=/<|&#?\w+;/,it=/<(?:script|style|link)/i,ot=/^(?:checkbox|radio)$/i,st=/checked\s*(?:[^=]|=\s*.checked.)/i,at=/^$|\/(?:java|ecma)script/i,ut=/^true\/(.*)/,lt=/^\s*\s*$/g,ct={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};ct.optgroup=ct.option,ct.tbody=ct.tfoot=ct.colgroup=ct.caption=ct.thead,ct.th=ct.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===undefined?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||o).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=pt(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=pt(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(mt(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&dt(mt(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(mt(e,!1)),e.textContent="");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 t=this[0]||{},n=0,r=this.length;if(e===undefined&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!it.test(e)&&!ct[(nt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(tt,"<$1>");try{for(;r>n;n++)t=this[n]||{},1===t.nodeType&&(x.cleanData(mt(t,!1)),t.innerHTML=e);t=0}catch(i){}}t&&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=f.apply([],e);var r,i,o,s,a,u,l=0,c=this.length,p=this,h=c-1,d=e[0],g=x.isFunction(d);if(g||!(1>=c||"string"!=typeof d||x.support.checkClone)&&st.test(d))return this.each(function(r){var i=p.eq(r);g&&(e[0]=d.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(r=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),i=r.firstChild,1===r.childNodes.length&&(r=i),i)){for(o=x.map(mt(r,"script"),ft),s=o.length;c>l;l++)a=r,l!==h&&(a=x.clone(a,!0,!0),s&&x.merge(o,mt(a,"script"))),t.call(this[l],a,l);if(s)for(u=o[o.length-1].ownerDocument,x.map(o,ht),l=0;s>l;l++)a=o[l],at.test(a.type||"")&&!q.access(a,"globalEval")&&x.contains(u,a)&&(a.src?x._evalUrl(a.src):x.globalEval(a.textContent.replace(lt,"")))}return this}}),x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=[],i=x(e),o=i.length-1,s=0;for(;o>=s;s++)n=s===o?this:this.clone(!0),x(i[s])[t](n),h.apply(r,n.get());return this.pushStack(r)}}),x.extend({clone:function(e,t,n){var r,i,o,s,a=e.cloneNode(!0),u=x.contains(e.ownerDocument,e);if(!(x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(s=mt(a),o=mt(e),r=0,i=o.length;i>r;r++)yt(o[r],s[r]);if(t)if(n)for(o=o||mt(e),s=s||mt(a),r=0,i=o.length;i>r;r++)gt(o[r],s[r]);else gt(e,a);return s=mt(a,"script"),s.length>0&&dt(s,!u&&mt(e,"script")),a},buildFragment:function(e,t,n,r){var i,o,s,a,u,l,c=0,p=e.length,f=t.createDocumentFragment(),h=[];for(;p>c;c++)if(i=e[c],i||0===i)if("object"===x.type(i))x.merge(h,i.nodeType?[i]:i);else if(rt.test(i)){o=o||f.appendChild(t.createElement("div")),s=(nt.exec(i)||["",""])[1].toLowerCase(),a=ct[s]||ct._default,o.innerHTML=a[1]+i.replace(tt,"<$1>")+a[2],l=a[0];while(l--)o=o.lastChild;x.merge(h,o.childNodes),o=f.firstChild,o.textContent=""}else h.push(t.createTextNode(i));f.textContent="",c=0;while(i=h[c++])if((!r||-1===x.inArray(i,r))&&(u=x.contains(i.ownerDocument,i),o=mt(f.appendChild(i),"script"),u&&dt(o),n)){l=0;while(i=o[l++])at.test(i.type||"")&&n.push(i)}return f},cleanData:function(e){var t,n,r,i,o,s,a=x.event.special,u=0;for(;(n=e[u])!==undefined;u++){if(F.accepts(n)&&(o=n[q.expando],o&&(t=q.cache[o]))){if(r=Object.keys(t.events||{}),r.length)for(s=0;(i=r[s])!==undefined;s++)a[i]?x.event.remove(n,i):x.removeEvent(n,i,t.handle);q.cache[o]&&delete q.cache[o]}delete L.cache[n[L.expando]]}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}});function pt(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 ft(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function ht(e){var t=ut.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function dt(e,t){var n=e.length,r=0;for(;n>r;r++)q.set(e[r],"globalEval",!t||q.get(t[r],"globalEval"))}function gt(e,t){var n,r,i,o,s,a,u,l;if(1===t.nodeType){if(q.hasData(e)&&(o=q.access(e),s=q.set(t,o),l=o.events)){delete s.handle,s.events={};for(i in l)for(n=0,r=l[i].length;r>n;n++)x.event.add(t,i,l[i][n])}L.hasData(e)&&(a=L.access(e),u=x.extend({},a),L.set(t,u))}}function mt(e,t){var n=e.getElementsByTagName?e.getElementsByTagName(t||"*"):e.querySelectorAll?e.querySelectorAll(t||"*"):[];return t===undefined||t&&x.nodeName(e,t)?x.merge([e],n):n}function yt(e,t){var n=t.nodeName.toLowerCase();"input"===n&&ot.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}x.fn.extend({wrapAll:function(e){var t;return x.isFunction(e)?this.each(function(t){x(this).wrapAll(e.call(this,t))}):(this[0]&&(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.firstElementChild)e=e.firstElementChild;return e}).append(this)),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 vt,xt,bt=/^(none|table(?!-c[ea]).+)/,wt=/^margin/,Tt=RegExp("^("+b+")(.*)$","i"),Ct=RegExp("^("+b+")(?!px)[a-z%]+$","i"),kt=RegExp("^([+-])=("+b+")","i"),Nt={BODY:"block"},Et={position:"absolute",visibility:"hidden",display:"block"},St={letterSpacing:0,fontWeight:400},jt=["Top","Right","Bottom","Left"],Dt=["Webkit","O","Moz","ms"];function At(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=Dt.length;while(i--)if(t=Dt[i]+n,t in e)return t;return r}function Lt(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function qt(t){return e.getComputedStyle(t,null)}function Ht(e,t){var n,r,i,o=[],s=0,a=e.length;for(;a>s;s++)r=e[s],r.style&&(o[s]=q.get(r,"olddisplay"),n=r.style.display,t?(o[s]||"none"!==n||(r.style.display=""),""===r.style.display&&Lt(r)&&(o[s]=q.access(r,"olddisplay",Rt(r.nodeName)))):o[s]||(i=Lt(r),(n&&"none"!==n||!i)&&q.set(r,"olddisplay",i?n:x.css(r,"display"))));for(s=0;a>s;s++)r=e[s],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[s]||"":"none"));return e}x.fn.extend({css:function(e,t){return x.access(this,function(e,t,n){var r,i,o={},s=0;if(x.isArray(t)){for(r=qt(e),i=t.length;i>s;s++)o[t[s]]=x.css(e,t[s],!1,r);return o}return n!==undefined?x.style(e,t,n):x.css(e,t)},e,t,arguments.length>1)},show:function(){return Ht(this,!0)},hide:function(){return Ht(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Lt(this)?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=vt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,s,a=x.camelCase(t),u=e.style;return t=x.cssProps[a]||(x.cssProps[a]=At(u,a)),s=x.cssHooks[t]||x.cssHooks[a],n===undefined?s&&"get"in s&&(i=s.get(e,!1,r))!==undefined?i:u[t]:(o=typeof n,"string"===o&&(i=kt.exec(n))&&(n=(i[1]+1)*i[2]+parseFloat(x.css(e,t)),o="number"),null==n||"number"===o&&isNaN(n)||("number"!==o||x.cssNumber[a]||(n+="px"),x.support.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),s&&"set"in s&&(n=s.set(e,n,r))===undefined||(u[t]=n)),undefined)}},css:function(e,t,n,r){var i,o,s,a=x.camelCase(t);return t=x.cssProps[a]||(x.cssProps[a]=At(e.style,a)),s=x.cssHooks[t]||x.cssHooks[a],s&&"get"in s&&(i=s.get(e,!0,n)),i===undefined&&(i=vt(e,t,r)),"normal"===i&&t in St&&(i=St[t]),""===n||n?(o=parseFloat(i),n===!0||x.isNumeric(o)?o||0:i):i}}),vt=function(e,t,n){var r,i,o,s=n||qt(e),a=s?s.getPropertyValue(t)||s[t]:undefined,u=e.style;return s&&(""!==a||x.contains(e.ownerDocument,e)||(a=x.style(e,t)),Ct.test(a)&&wt.test(t)&&(r=u.width,i=u.minWidth,o=u.maxWidth,u.minWidth=u.maxWidth=u.width=a,a=s.width,u.width=r,u.minWidth=i,u.maxWidth=o)),a};function Ot(e,t,n){var r=Tt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function Ft(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,s=0;for(;4>o;o+=2)"margin"===n&&(s+=x.css(e,n+jt[o],!0,i)),r?("content"===n&&(s-=x.css(e,"padding"+jt[o],!0,i)),"margin"!==n&&(s-=x.css(e,"border"+jt[o]+"Width",!0,i))):(s+=x.css(e,"padding"+jt[o],!0,i),"padding"!==n&&(s+=x.css(e,"border"+jt[o]+"Width",!0,i)));return s}function Pt(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=qt(e),s=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=vt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Ct.test(i))return i;r=s&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+Ft(e,t,n||(s?"border":"content"),r,o)+"px"}function Rt(e){var t=o,n=Nt[e];return n||(n=Mt(e,t),"none"!==n&&n||(xt=(xt||x(" - - - - diff --git a/docs/reference/themes/mongodb/layouts/partials/assets/css.html b/docs/reference/themes/mongodb/layouts/partials/assets/css.html deleted file mode 100644 index 6a39d8ff648..00000000000 --- a/docs/reference/themes/mongodb/layouts/partials/assets/css.html +++ /dev/null @@ -1,6 +0,0 @@ - - - - - -{{ partial "assets/cssExtras.html" . }} diff --git a/docs/reference/themes/mongodb/layouts/partials/assets/cssExtras.html b/docs/reference/themes/mongodb/layouts/partials/assets/cssExtras.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/docs/reference/themes/mongodb/layouts/partials/assets/javascriptExtras.html b/docs/reference/themes/mongodb/layouts/partials/assets/javascriptExtras.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/docs/reference/themes/mongodb/layouts/partials/assets/javascripts.html b/docs/reference/themes/mongodb/layouts/partials/assets/javascripts.html deleted file mode 100644 index fcf67f0e4e4..00000000000 --- a/docs/reference/themes/mongodb/layouts/partials/assets/javascripts.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - -{{ partial "assets/javascriptExtras.html" . }} diff --git a/docs/reference/themes/mongodb/layouts/partials/footer.html b/docs/reference/themes/mongodb/layouts/partials/footer.html deleted file mode 100644 index 2f503390019..00000000000 --- a/docs/reference/themes/mongodb/layouts/partials/footer.html +++ /dev/null @@ -1,38 +0,0 @@ -{{ if .IsPage }} - -{{ $menuPrev := $.Scratch.Get "menu.Prev"}} -{{ $menuNext := $.Scratch.Get "menu.Next"}} - -
- {{ with $menuPrev }} - - {{ end }} - {{ with $menuNext }} -
- - {{ end }} -
-
-{{ end }} - - -{{ partial "rightColumn.html" . }} - - - - - - - - - -{{ partial "assets/javascripts.html" . }} -{{ partial "assets/analytics.html" . }} - - diff --git a/docs/reference/themes/mongodb/layouts/partials/header.html b/docs/reference/themes/mongodb/layouts/partials/header.html deleted file mode 100644 index 4a84ee53a5a..00000000000 --- a/docs/reference/themes/mongodb/layouts/partials/header.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - {{ partial "meta.html"}} - - {{.Title}} - - {{ partial "assets/css.html" . }} - - - - -
- - {{ partial "header/main.html" . }} - - - {{ partial "menu.html" . }} - - -
-
-
-
-
-
diff --git a/docs/reference/themes/mongodb/layouts/partials/header/contentHeader.html b/docs/reference/themes/mongodb/layouts/partials/header/contentHeader.html deleted file mode 100644 index 1ac697b6b85..00000000000 --- a/docs/reference/themes/mongodb/layouts/partials/header/contentHeader.html +++ /dev/null @@ -1,25 +0,0 @@ -{{ if .IsPage }} -{{ $File := .File }} {{with $File.LogicalName }} {{ $srcref := add (add "docs/reference/content/" $File.Dir) $File.LogicalName }} - -{{end}} -{{end}} -{{ $menuItemL6 := $.Scratch.Get "menu.Item.L6"}} -{{ $menuItemL5 := $.Scratch.Get "menu.Item.L5"}} -{{ $menuItemL4 := $.Scratch.Get "menu.Item.L4"}} -{{ $menuItemL3 := $.Scratch.Get "menu.Item.L3"}} -{{ $menuItemL2 := $.Scratch.Get "menu.Item.L2"}} -{{ $menuItemL1 := $.Scratch.Get "menu.Item.L1"}} -{{ $menuItemL0 := $.Scratch.Get "menu.Item.L0"}} -{{if $menuItemL0}} -
- -
-{{ end }} diff --git a/docs/reference/themes/mongodb/layouts/partials/header/main.html b/docs/reference/themes/mongodb/layouts/partials/header/main.html deleted file mode 100644 index f927ee5038e..00000000000 --- a/docs/reference/themes/mongodb/layouts/partials/header/main.html +++ /dev/null @@ -1,17 +0,0 @@ - - diff --git a/docs/reference/themes/mongodb/layouts/partials/header/search.html b/docs/reference/themes/mongodb/layouts/partials/header/search.html deleted file mode 100644 index ac41c4db1b2..00000000000 --- a/docs/reference/themes/mongodb/layouts/partials/header/search.html +++ /dev/null @@ -1,8 +0,0 @@ - diff --git a/docs/reference/themes/mongodb/layouts/partials/header/topRight.html b/docs/reference/themes/mongodb/layouts/partials/header/topRight.html deleted file mode 100644 index 6f1101c50d8..00000000000 --- a/docs/reference/themes/mongodb/layouts/partials/header/topRight.html +++ /dev/null @@ -1,10 +0,0 @@ -
- -
diff --git a/docs/reference/themes/mongodb/layouts/partials/menu.html b/docs/reference/themes/mongodb/layouts/partials/menu.html deleted file mode 100644 index 03c1e3d9fb2..00000000000 --- a/docs/reference/themes/mongodb/layouts/partials/menu.html +++ /dev/null @@ -1,52 +0,0 @@ - - - -{{ partial "menu/options.html" . }} diff --git a/docs/reference/themes/mongodb/layouts/partials/menu/currentItem.html b/docs/reference/themes/mongodb/layouts/partials/menu/currentItem.html deleted file mode 100644 index 4c578944175..00000000000 --- a/docs/reference/themes/mongodb/layouts/partials/menu/currentItem.html +++ /dev/null @@ -1,75 +0,0 @@ -{{ $currentNode := . }} -{{ $menuItemL6 := $.Scratch.Get "menu.Item.L6"}} -{{ $menuItemL5 := $.Scratch.Get "menu.Item.L5"}} -{{ $menuItemL4 := $.Scratch.Get "menu.Item.L4"}} -{{ $menuItemL3 := $.Scratch.Get "menu.Item.L3"}} -{{ $menuItemL2 := $.Scratch.Get "menu.Item.L2"}} -{{ $menuItemL1 := $.Scratch.Get "menu.Item.L1"}} -{{ $menuItem := $.Scratch.Get "menu.Item"}} - -{{ if $currentNode.IsMenuCurrent "main" $menuItem }} - {{ $.Scratch.Set "menu.Found" true }} - {{ $.Scratch.Set "menu.Item.L6" false }} - {{ $.Scratch.Set "menu.Item.L5" false }} - {{ $.Scratch.Set "menu.Item.L4" false }} - {{ $.Scratch.Set "menu.Item.L3" false }} - {{ $.Scratch.Set "menu.Item.L2" false }} - {{ $.Scratch.Set "menu.Item.L1" false }} - {{ $.Scratch.Set "menu.Item.L0" $menuItem }} - - {{ if $menuItemL1 }} - {{ if eq $menuItemL1.Identifier $menuItem.Parent }} - {{ $.Scratch.Set "menu.Item.L1" $menuItemL1 }} - {{ if $menuItemL2 }} - {{ if eq $menuItemL2.Identifier $menuItemL1.Parent }} - {{ $.Scratch.Set "menu.Item.L2" $menuItemL2 }} - {{ if $menuItemL3 }} - {{ if eq $menuItemL3.Identifier $menuItemL2.Parent }} - {{ $.Scratch.Set "menu.Item.L3" $menuItemL3 }} - {{ if $menuItemL4 }} - {{ if eq $menuItemL4.Identifier $menuItemL3.Parent }} - {{ $.Scratch.Set "menu.Item.L4" $menuItemL4 }} - {{ if $menuItemL5 }} - {{ if eq $menuItemL5.Identifier $menuItemL4.Parent }} - {{ $.Scratch.Set "menu.Item.L5" $menuItemL5 }} - {{ if $menuItemL6 }} - {{ if eq $menuItemL6.Identifier $menuItemL5.Parent }} - {{ $.Scratch.Set "menu.Item.L6" $menuItemL6 }} - {{end}} - {{end}} - {{end}} - {{end}} - {{end}} - {{end}} - {{end}} - {{end}} - {{end}} - {{end}} - {{end}} - {{end}} -{{ else }} - {{ if $menuItem.HasChildren }} - {{$found := $.Scratch.Get "menu.Found" }} - {{ range $menuItem.Children }} - {{ $.Scratch.Set "menu.Item" . }} - {{if eq ($.Scratch.Get "menu.Found") false }} - {{ $.Scratch.Set "menu.Item.L6" $menuItemL5}} - {{ $.Scratch.Set "menu.Item.L5" $menuItemL4}} - {{ $.Scratch.Set "menu.Item.L4" $menuItemL3}} - {{ $.Scratch.Set "menu.Item.L3" $menuItemL2}} - {{ $.Scratch.Set "menu.Item.L2" $menuItemL1}} - {{ $.Scratch.Set "menu.Item.L1" $menuItem}} - {{ $.Scratch.Set "menu.Item" . }} - {{ partial "menu/currentItem.html" $currentNode }} - {{if eq ($.Scratch.Get "menu.Found") false }} - {{ $.Scratch.Set "menu.Prev" . }} - {{ end }} - {{ else if and (eq $found false) (eq ($.Scratch.Get "menu.Next") false) }} - {{ $.Scratch.Set "menu.Next" . }} - {{ end }} - {{ end }} - {{if eq ($.Scratch.Get "menu.Found") false }} - {{ $.Scratch.Set "menu.Prev" false }} - {{ end }} - {{ end }} -{{ end }} diff --git a/docs/reference/themes/mongodb/layouts/partials/menu/footer.html b/docs/reference/themes/mongodb/layouts/partials/menu/footer.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/docs/reference/themes/mongodb/layouts/partials/menu/item.html b/docs/reference/themes/mongodb/layouts/partials/menu/item.html deleted file mode 100644 index 5802fc67073..00000000000 --- a/docs/reference/themes/mongodb/layouts/partials/menu/item.html +++ /dev/null @@ -1,54 +0,0 @@ -{{ $currentNode := . }} -{{ $menuItem := $.Scratch.Get "menu.Item"}} -{{ $menuNodeLevel := $.Scratch.Get "menu.NodeLevel"}} - -{{ $menuItemL6 := $.Scratch.Get "menu.Item.L6"}} -{{ $menuItemL5 := $.Scratch.Get "menu.Item.L5"}} -{{ $menuItemL4 := $.Scratch.Get "menu.Item.L4"}} -{{ $menuItemL3 := $.Scratch.Get "menu.Item.L3"}} -{{ $menuItemL2 := $.Scratch.Get "menu.Item.L2"}} -{{ $menuItemL1 := $.Scratch.Get "menu.Item.L1"}} -{{ $menuItemL0 := $.Scratch.Get "menu.Item.L0"}} - -{{$.Scratch.Set "menu.isCurrent" false}} -{{if eq $menuItem $menuItemL0 }} - {{$.Scratch.Set "menu.isCurrent" true}} -{{else if eq $menuItem $menuItemL1 }} - {{$.Scratch.Set "menu.isCurrent" true}} -{{else if eq $menuItem $menuItemL2 }} - {{$.Scratch.Set "menu.isCurrent" true}} -{{else if eq $menuItem $menuItemL3 }} - {{$.Scratch.Set "menu.isCurrent" true}} -{{else if eq $menuItem $menuItemL4 }} - {{$.Scratch.Set "menu.isCurrent" true}} -{{else if eq $menuItem $menuItemL5 }} - {{$.Scratch.Set "menu.isCurrent" true}} -{{else if eq $menuItem $menuItemL6 }} - {{$.Scratch.Set "menu.isCurrent" true}} -{{end}} -{{ $isCurrent := $.Scratch.Get "menu.isCurrent"}} - -{{ if $menuItem.HasChildren }} -
  • - - {{ $menuItem.Pre }} - {{ $menuItem.Name }} - {{if lt $menuNodeLevel 2}}{{end}} - -
      - {{ range $menuItem.Children }} - {{ $menuItem := $.Scratch.Set "menu.Item" . }} - {{ $menuNodeLevel := $.Scratch.Add "menu.NodeLevel" 1}} - {{ partial "menu/item.html" $currentNode }} - {{ $menuNodeLevel := $.Scratch.Add "menu.NodeLevel" -1}} - {{ end }} -
    -
  • -{{else}} -
  • - - {{ $menuItem.Pre }} - {{ $menuItem.Name }} - -
  • -{{end}} diff --git a/docs/reference/themes/mongodb/layouts/partials/menu/options.html b/docs/reference/themes/mongodb/layouts/partials/menu/options.html deleted file mode 100644 index fa7a3a02309..00000000000 --- a/docs/reference/themes/mongodb/layouts/partials/menu/options.html +++ /dev/null @@ -1,28 +0,0 @@ - diff --git a/docs/reference/themes/mongodb/layouts/partials/meta.html b/docs/reference/themes/mongodb/layouts/partials/meta.html deleted file mode 100644 index 408b03e3337..00000000000 --- a/docs/reference/themes/mongodb/layouts/partials/meta.html +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/docs/reference/themes/mongodb/layouts/partials/rightColumn.html b/docs/reference/themes/mongodb/layouts/partials/rightColumn.html deleted file mode 100644 index 52e86a5221a..00000000000 --- a/docs/reference/themes/mongodb/layouts/partials/rightColumn.html +++ /dev/null @@ -1,10 +0,0 @@ -
    -
    - {{ if .IsPage }} -
    - On this page - {{ .TableOfContents}} -
    - {{ end }} -
    -
    diff --git a/docs/reference/themes/mongodb/layouts/partials/welcome.html b/docs/reference/themes/mongodb/layouts/partials/welcome.html deleted file mode 100644 index 0eccdb42a93..00000000000 --- a/docs/reference/themes/mongodb/layouts/partials/welcome.html +++ /dev/null @@ -1,32 +0,0 @@ -

    Welcome to the hugo mongodb docs theme.

    - -

    You have two choices when it comes to managing this front page.

    - -

    1. Markdown:

    - -

    First create your own index page in content: hugo new ./content/index.md

    - -

    Set a type in the “front matter” to index eg:

    - -
    +++
    -date = "2015-03-17T15:36:56Z"
    -draft = false
    -title = "index"
    -type = "index"
    -+++
    -
    -## Add your markdown content to your frontpage.
    -
    -Hello welcome to my driver docs
    -
    - -

    2. HTML

    - -

    Create your own layouts\index.html eg:

    - -
    {{ partial "header.html" . }}
    -
    -<h2>Add your HTML content to your frontpage.</h2>
    -
    -{{ partial "footer.html" . }}
    -
    diff --git a/docs/reference/themes/mongodb/layouts/shortcodes/docsref.html b/docs/reference/themes/mongodb/layouts/shortcodes/docsref.html deleted file mode 100644 index 6a4d322268e..00000000000 --- a/docs/reference/themes/mongodb/layouts/shortcodes/docsref.html +++ /dev/null @@ -1 +0,0 @@ -http://docs.mongodb.org/manual/{{ .Get 0 }} diff --git a/docs/reference/themes/mongodb/layouts/shortcodes/note.html b/docs/reference/themes/mongodb/layouts/shortcodes/note.html deleted file mode 100644 index 0988a049a3b..00000000000 --- a/docs/reference/themes/mongodb/layouts/shortcodes/note.html +++ /dev/null @@ -1,4 +0,0 @@ -
    -
    {{if .Get "class"}}{{.Get "class"}}{{else}}Note{{end}}
    -{{ .Inner }} -
    diff --git a/docs/reference/themes/mongodb/layouts/shortcodes/srcref.html b/docs/reference/themes/mongodb/layouts/shortcodes/srcref.html deleted file mode 100644 index 1f7dfc14567..00000000000 --- a/docs/reference/themes/mongodb/layouts/shortcodes/srcref.html +++ /dev/null @@ -1 +0,0 @@ -https://github.com/mongodb/{{ .Page.Site.Data.mongodb.githubRepo }}/blob/{{ .Page.Site.Data.mongodb.githubBranch }}/{{ if eq (in (.Get 0) "src/") false }}src/{{ end }}{{ .Get 0 }} diff --git a/docs/reference/themes/mongodb/layouts/shortcodes/warning.html b/docs/reference/themes/mongodb/layouts/shortcodes/warning.html deleted file mode 100644 index 71cd04ac607..00000000000 --- a/docs/reference/themes/mongodb/layouts/shortcodes/warning.html +++ /dev/null @@ -1,4 +0,0 @@ -
    -
    {{if .Get "class"}}{{.Get "class"}}{{else}}Note{{end}}
    -{{ .Inner }} -
    diff --git a/docs/reference/themes/mongodb/static/.nojekyll b/docs/reference/themes/mongodb/static/.nojekyll deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/docs/reference/themes/mongodb/static/css/basic.css b/docs/reference/themes/mongodb/static/css/basic.css deleted file mode 100644 index 8971e11aea0..00000000000 --- a/docs/reference/themes/mongodb/static/css/basic.css +++ /dev/null @@ -1,537 +0,0 @@ -/* - * basic.css - * ~~~~~~~~~ - * - * Sphinx stylesheet -- basic theme. - * - * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -/* -- main layout ----------------------------------------------------------- */ - -div.clearer { - clear: both; -} - -/* -- relbar ---------------------------------------------------------------- */ - -div.related { - width: 100%; - font-size: 90%; -} - -div.related h3 { - display: none; -} - -div.related ul { - margin: 0; - padding: 0 0 0 10px; - list-style: none; -} - -div.related li { - display: inline; -} - -div.related li.right { - float: right; - margin-right: 5px; -} - -/* -- sidebar --------------------------------------------------------------- */ - -div.sphinxsidebarwrapper { - padding: 10px 5px 0 10px; -} - -div.sphinxsidebar { - font-size: 90%; -} - -div.sphinxsidebar ul { - list-style: none; -} - -div.sphinxsidebar ul ul, -div.sphinxsidebar ul.want-points { - margin-left: 20px; - list-style: square; -} - -div.sphinxsidebar ul ul { - margin-top: 0; - margin-bottom: 0; -} - -div.sphinxsidebar form { - margin-top: 10px; -} - -div.sphinxsidebar input { - border: 1px solid #98dbcc; - font-family: sans-serif; - font-size: 1em; -} - -div.sphinxsidebar #searchbox input[type="text"] { - width: 170px; -} - -div.sphinxsidebar #searchbox input[type="submit"] { - width: 30px; -} - -img { - border: 0; -} - -/* -- search page ----------------------------------------------------------- */ - -ul.search { - margin: 10px 0 0 20px; - padding: 0; -} - -ul.search li { - padding: 5px 0 5px 20px; - background-image: url(file.png); - background-repeat: no-repeat; - background-position: 0 7px; -} - -ul.search li a { - font-weight: bold; -} - -ul.search li div.context { - color: #888; - margin: 2px 0 0 30px; - text-align: left; -} - -ul.keywordmatches li.goodmatch a { - font-weight: bold; -} - -/* -- index page ------------------------------------------------------------ */ - -table.contentstable { - width: 90%; -} - -table.contentstable p.biglink { - line-height: 150%; -} - -a.biglink { - font-size: 1.3em; -} - -span.linkdescr { - font-style: italic; - padding-top: 5px; - font-size: 90%; -} - -/* -- general index --------------------------------------------------------- */ - -table.indextable { - width: 100%; -} - -table.indextable td { - text-align: left; - vertical-align: top; -} - -table.indextable dl, table.indextable dd { - margin-top: 0; - margin-bottom: 0; -} - -table.indextable tr.pcap { - height: 10px; -} - -table.indextable tr.cap { - margin-top: 10px; - background-color: #f2f2f2; -} - -img.toggler { - margin-right: 3px; - margin-top: 3px; - cursor: pointer; -} - -div.modindex-jumpbox { - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; - margin: 1em 0 1em 0; - padding: 0.4em; -} - -div.genindex-jumpbox { - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; - margin: 1em 0 1em 0; - padding: 0.4em; -} - -/* -- general body styles --------------------------------------------------- */ - -a.headerlink { - visibility: hidden; -} - -h1:hover > a.headerlink, -h2:hover > a.headerlink, -h3:hover > a.headerlink, -h4:hover > a.headerlink, -h5:hover > a.headerlink, -h6:hover > a.headerlink, -dt:hover > a.headerlink { - visibility: visible; -} - -div.body p.caption { - text-align: inherit; -} - -div.body td { - text-align: left; -} - -.field-list ul { - padding-left: 1em; -} - -.first { - margin-top: 0 !important; -} - -p.rubric { - margin-top: 30px; - font-weight: bold; -} - -img.align-left, .figure.align-left, object.align-left { - clear: left; - float: left; - margin-right: 1em; -} - -img.align-right, .figure.align-right, object.align-right { - clear: right; - float: right; - margin-left: 1em; -} - -img.align-center, .figure.align-center, object.align-center { - display: block; - margin-left: auto; - margin-right: auto; -} - -.align-left { - text-align: left; -} - -.align-center { - text-align: center; -} - -.align-right { - text-align: right; -} - -/* -- sidebars -------------------------------------------------------------- */ - -div.sidebar { - margin: 0 0 0.5em 1em; - border: 1px solid #ddb; - padding: 7px 7px 0 7px; - background-color: #ffe; - width: 40%; - float: right; -} - -p.sidebar-title { - font-weight: bold; -} - -/* -- topics ---------------------------------------------------------------- */ - -div.topic { - border: 1px solid #ccc; - padding: 7px 7px 0 7px; - margin: 10px 0 10px 0; -} - -p.topic-title { - font-size: 1.1em; - font-weight: bold; - margin-top: 10px; -} - -/* -- admonitions ----------------------------------------------------------- */ - -div.admonition { - margin-top: 10px; - margin-bottom: 10px; - padding: 7px; -} - -div.admonition dt { - font-weight: bold; -} - -div.admonition dl { - margin-bottom: 0; -} - -p.admonition-title { - margin: 0px 10px 5px 0px; - font-weight: bold; -} - -div.body p.centered { - text-align: center; - margin-top: 25px; -} - -/* -- tables ---------------------------------------------------------------- */ - -table.docutils { - border: 0; - border-collapse: collapse; -} - -table.docutils td, table.docutils th { - padding: 1px 8px 1px 5px; - border-top: 0; - border-left: 0; - border-right: 0; - border-bottom: 1px solid #aaa; -} - -table.field-list td, table.field-list th { - border: 0 !important; -} - -table.footnote td, table.footnote th { - border: 0 !important; -} - -th { - text-align: left; - padding-right: 5px; -} - -table.citation { - border-left: solid 1px gray; - margin-left: 1px; -} - -table.citation td { - border-bottom: none; -} - -/* -- other body styles ----------------------------------------------------- */ - -ol.arabic { - list-style: decimal; -} - -ol.loweralpha { - list-style: lower-alpha; -} - -ol.upperalpha { - list-style: upper-alpha; -} - -ol.lowerroman { - list-style: lower-roman; -} - -ol.upperroman { - list-style: upper-roman; -} - -dl { - margin-bottom: 15px; -} - -dd p { - margin-top: 0px; -} - -dd ul, dd table { - margin-bottom: 10px; -} - -dd { - margin-top: 3px; - margin-bottom: 10px; - margin-left: 30px; -} - -dt:target, .highlighted { - background-color: #fbe54e; -} - -dl.glossary dt { - font-weight: bold; - font-size: 1.1em; -} - -.field-list ul { - margin: 0; - padding-left: 1em; -} - -.field-list p { - margin: 0; -} - -.refcount { - color: #060; -} - -.optional { - font-size: 1.3em; -} - -.versionmodified { - font-style: italic; -} - -.system-message { - background-color: #fda; - padding: 5px; - border: 3px solid red; -} - -.footnote:target { - background-color: #ffa; -} - -.line-block { - display: block; - margin-top: 1em; - margin-bottom: 1em; -} - -.line-block .line-block { - margin-top: 0; - margin-bottom: 0; - margin-left: 1.5em; -} - -.guilabel, .menuselection { - font-family: sans-serif; -} - -.accelerator { - text-decoration: underline; -} - -.classifier { - font-style: oblique; -} - -abbr, acronym { - border-bottom: dotted 1px; - cursor: help; -} - -/* -- code displays --------------------------------------------------------- */ - -pre { - overflow: auto; - overflow-y: hidden; /* fixes display issues on Chrome browsers */ -} - -td.linenos pre { - padding: 5px 0px; - border: 0; - background-color: transparent; - color: #aaa; -} - -table.highlighttable { - margin-left: 0.5em; -} - -table.highlighttable td { - padding: 0 0.5em 0 0.5em; -} - -tt.descname { - background-color: transparent; - font-weight: bold; - font-size: 1.2em; -} - -tt.descclassname { - background-color: transparent; -} - -tt.xref, a tt { - background-color: transparent; - font-weight: bold; -} - -h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt { - background-color: transparent; -} - -.viewcode-link { - float: right; -} - -.viewcode-back { - float: right; - font-family: sans-serif; -} - -div.viewcode-block:target { - margin: -1px -10px; - padding: 0 10px; -} - -/* -- math display ---------------------------------------------------------- */ - -img.math { - vertical-align: middle; -} - -div.body div.math p { - text-align: center; -} - -span.eqno { - float: right; -} - -/* -- printout stylesheet --------------------------------------------------- */ - -@media print { - div.document, - div.documentwrapper, - div.bodywrapper { - margin: 0 !important; - width: 100%; - } - - div.sphinxsidebar, - div.related, - div.footer, - #top-link { - display: none; - } -} \ No newline at end of file diff --git a/docs/reference/themes/mongodb/static/css/bootstrap-custom.css b/docs/reference/themes/mongodb/static/css/bootstrap-custom.css deleted file mode 100644 index ebd6d579158..00000000000 --- a/docs/reference/themes/mongodb/static/css/bootstrap-custom.css +++ /dev/null @@ -1,5908 +0,0 @@ -/*! - * Bootstrap v3.0.0 - * - * Copyright 2013 Twitter, Inc - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Designed and built with all the love in the world by @mdo and @fat. - */ -/*! normalize.css v2.1.0 | MIT License | git.io/normalize */ -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -main, -nav, -section, -summary { - display: block; -} -audio, -canvas, -video { - display: inline-block; -} -audio:not([controls]) { - display: none; - height: 0; -} -[hidden] { - display: none; -} -html { - font-family: sans-serif; - -webkit-text-size-adjust: 100%; - -ms-text-size-adjust: 100%; -} -body { - margin: 0; -} -a:focus { - outline: thin dotted; -} -a:active, -a:hover { - outline: 0; -} -h1 { - font-size: 2em; - margin: 0.67em 0; -} -abbr[title] { - border-bottom: 1px dotted; -} -b, -strong { - font-weight: bold; -} -dfn { - font-style: italic; -} -hr { - -moz-box-sizing: content-box; - box-sizing: content-box; - height: 0; -} -mark { - background: #ff0; - color: #000; -} -code, -kbd, -pre, -samp { - font-family: monospace, serif; - font-size: 1em; -} -pre { - white-space: pre-wrap; -} -q { - quotes: "\201C" "\201D" "\2018" "\2019"; -} -small { - font-size: 80%; -} -sub, -sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; -} -sup { - top: -0.5em; -} -sub { - bottom: -0.25em; -} -img { - border: 0; -} -svg:not(:root) { - overflow: hidden; -} -figure { - margin: 0; -} -fieldset { - border: 1px solid #c0c0c0; - margin: 0 2px; - padding: 0.35em 0.625em 0.75em; -} -legend { - border: 0; - padding: 0; -} -button, -input, -select, -textarea { - font-family: inherit; - font-size: 100%; - margin: 0; -} -button, -input { - line-height: normal; -} -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; -} -input[type="checkbox"], -input[type="radio"] { - box-sizing: border-box; - padding: 0; -} -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; -} -button::-moz-focus-inner, -input::-moz-focus-inner { - border: 0; - padding: 0; -} -textarea { - overflow: auto; - vertical-align: top; -} -table { - border-collapse: collapse; - border-spacing: 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) ")"; - } - .ir a:after, - 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; - } - @page { - margin: 2cm .5cm; - } - p, - h2, - h3 { - orphans: 3; - widows: 3; - } - h2, - h3 { - page-break-after: avoid; - } - .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; - } -} -*, -*: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.428571429; - color: #333333; - background-color: #ffffff; -} -input, -button, -select, -textarea { - font-family: inherit; - font-size: inherit; - line-height: inherit; -} -button, -input, -select[multiple], -textarea { - background-image: none; -} -a { - color: #428bca; - text-decoration: none; -} -a:hover, -a:focus { - color: #2a6496; - text-decoration: underline; -} -a:focus { - outline: thin dotted #333; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} -img { - vertical-align: middle; -} -.img-responsive { - display: block; - max-width: 100%; - height: auto; -} -.img-rounded { - border-radius: 6px; -} -.img-thumbnail { - padding: 4px; - line-height: 1.428571429; - background-color: #ffffff; - border: 1px solid #dddddd; - border-radius: 4px; - -webkit-transition: all 0.2s ease-in-out; - transition: all 0.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 #eeeeee; -} -.sr-only { - position: absolute; - width: 1px; - height: 1px; - margin: -1px; - padding: 0; - overflow: hidden; - clip: rect(0 0 0 0); - border: 0; -} -p { - margin: 0 0 10px; -} -.lead { - margin-bottom: 20px; - font-size: 16.099999999999998px; - font-weight: 200; - line-height: 1.4; -} -@media (min-width: 768px) { - .lead { - font-size: 21px; - } -} -small { - font-size: 85%; -} -cite { - font-style: normal; -} -.text-muted { - color: #999999; -} -.text-primary { - color: #428bca; -} -.text-warning { - color: #c09853; -} -.text-danger { - color: #b94a48; -} -.text-success { - color: #468847; -} -.text-info { - color: #3a87ad; -} -.text-left { - text-align: left; -} -.text-right { - text-align: right; -} -.text-center { - text-align: center; -} -h1, -h2, -h3, -h4, -h5, -h6, -.h1, -.h2, -.h3, -.h4, -.h5, -.h6 { - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-weight: 500; - line-height: 1.1; -} -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: normal; - line-height: 1; - color: #999999; -} -h1, -h2, -h3 { - margin-top: 20px; - margin-bottom: 10px; -} -h4, -h5, -h6 { - margin-top: 10px; - margin-bottom: 10px; -} -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; -} -h1 small, -.h1 small { - font-size: 24px; -} -h2 small, -.h2 small { - font-size: 18px; -} -h3 small, -.h3 small, -h4 small, -.h4 small { - font-size: 14px; -} -.page-header { - padding-bottom: 9px; - margin: 40px 0 20px; - border-bottom: 1px solid #eeeeee; -} -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; -} -.list-inline > li { - display: inline-block; - padding-left: 5px; - padding-right: 5px; -} -dl { - margin-bottom: 20px; -} -dt, -dd { - line-height: 1.428571429; -} -dt { - font-weight: bold; -} -dd { - margin-left: 0; -} -@media (min-width: 992px) { - .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; - } - .dl-horizontal dd:before, - .dl-horizontal dd:after { - content: " "; - /* 1 */ - - display: table; - /* 2 */ - - } - .dl-horizontal dd:after { - clear: both; - } - .dl-horizontal dd:before, - .dl-horizontal dd:after { - content: " "; - /* 1 */ - - display: table; - /* 2 */ - - } - .dl-horizontal dd:after { - clear: both; - } -} -abbr[title], -abbr[data-original-title] { - cursor: help; - border-bottom: 1px dotted #999999; -} -abbr.initialism { - font-size: 90%; - text-transform: uppercase; -} -blockquote { - padding: 10px 20px; - margin: 0 0 20px; - border-left: 5px solid #eeeeee; -} -blockquote p { - font-size: 17.5px; - font-weight: 300; - line-height: 1.25; -} -blockquote p:last-child { - margin-bottom: 0; -} -blockquote small { - display: block; - line-height: 1.428571429; - color: #999999; -} -blockquote small:before { - content: '\2014 \00A0'; -} -blockquote.pull-right { - padding-right: 15px; - padding-left: 0; - border-right: 5px solid #eeeeee; - border-left: 0; -} -blockquote.pull-right p, -blockquote.pull-right small { - text-align: right; -} -blockquote.pull-right small:before { - content: ''; -} -blockquote.pull-right small:after { - content: '\00A0 \2014'; -} -q:before, -q:after, -blockquote:before, -blockquote:after { - content: ""; -} -address { - display: block; - margin-bottom: 20px; - font-style: normal; - line-height: 1.428571429; -} -code, -pre { - font-family: Monaco, Menlo, Consolas, "Courier New", monospace; -} -code { - padding: 2px 4px; - font-size: 90%; - color: #c7254e; - background-color: #f9f2f4; - white-space: nowrap; - border-radius: 4px; -} -pre { - display: block; - padding: 9.5px; - margin: 0 0 10px; - font-size: 13px; - line-height: 1.428571429; - word-break: break-all; - word-wrap: break-word; - color: #333333; - background-color: #f5f5f5; - border: 1px solid #cccccc; - border-radius: 4px; -} -pre.prettyprint { - margin-bottom: 20px; -} -pre code { - padding: 0; - font-size: inherit; - color: inherit; - white-space: pre-wrap; - background-color: transparent; - border: 0; -} -.pre-scrollable { - max-height: 340px; - overflow-y: scroll; -} -.container { - margin-right: auto; - margin-left: auto; - padding-left: 15px; - padding-right: 15px; -} -.container:before, -.container:after { - content: " "; - /* 1 */ - - display: table; - /* 2 */ - -} -.container:after { - clear: both; -} -.container:before, -.container:after { - content: " "; - /* 1 */ - - display: table; - /* 2 */ - -} -.container:after { - clear: both; -} -.row { - margin-left: -15px; - margin-right: -15px; -} -.row:before, -.row:after { - content: " "; - /* 1 */ - - display: table; - /* 2 */ - -} -.row:after { - clear: both; -} -.row:before, -.row:after { - content: " "; - /* 1 */ - - display: table; - /* 2 */ - -} -.row:after { - clear: both; -} -.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, -.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, -.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, -.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 { - 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 { - float: left; -} -.col-xs-1 { - width: 8.333333333333332%; -} -.col-xs-2 { - width: 16.666666666666664%; -} -.col-xs-3 { - width: 25%; -} -.col-xs-4 { - width: 33.33333333333333%; -} -.col-xs-5 { - width: 41.66666666666667%; -} -.col-xs-6 { - width: 50%; -} -.col-xs-7 { - width: 58.333333333333336%; -} -.col-xs-8 { - width: 66.66666666666666%; -} -.col-xs-9 { - width: 75%; -} -.col-xs-10 { - width: 83.33333333333334%; -} -.col-xs-11 { - width: 91.66666666666666%; -} -.col-xs-12 { - width: 100%; -} -@media (min-width: 768px) { - .container { - max-width: 750px; - } - .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 { - float: left; - } - .col-sm-1 { - width: 8.333333333333332%; - } - .col-sm-2 { - width: 16.666666666666664%; - } - .col-sm-3 { - width: 25%; - } - .col-sm-4 { - width: 33.33333333333333%; - } - .col-sm-5 { - width: 41.66666666666667%; - } - .col-sm-6 { - width: 50%; - } - .col-sm-7 { - width: 58.333333333333336%; - } - .col-sm-8 { - width: 66.66666666666666%; - } - .col-sm-9 { - width: 75%; - } - .col-sm-10 { - width: 83.33333333333334%; - } - .col-sm-11 { - width: 91.66666666666666%; - } - .col-sm-12 { - width: 100%; - } - .col-sm-push-1 { - left: 8.333333333333332%; - } - .col-sm-push-2 { - left: 16.666666666666664%; - } - .col-sm-push-3 { - left: 25%; - } - .col-sm-push-4 { - left: 33.33333333333333%; - } - .col-sm-push-5 { - left: 41.66666666666667%; - } - .col-sm-push-6 { - left: 50%; - } - .col-sm-push-7 { - left: 58.333333333333336%; - } - .col-sm-push-8 { - left: 66.66666666666666%; - } - .col-sm-push-9 { - left: 75%; - } - .col-sm-push-10 { - left: 83.33333333333334%; - } - .col-sm-push-11 { - left: 91.66666666666666%; - } - .col-sm-pull-1 { - right: 8.333333333333332%; - } - .col-sm-pull-2 { - right: 16.666666666666664%; - } - .col-sm-pull-3 { - right: 25%; - } - .col-sm-pull-4 { - right: 33.33333333333333%; - } - .col-sm-pull-5 { - right: 41.66666666666667%; - } - .col-sm-pull-6 { - right: 50%; - } - .col-sm-pull-7 { - right: 58.333333333333336%; - } - .col-sm-pull-8 { - right: 66.66666666666666%; - } - .col-sm-pull-9 { - right: 75%; - } - .col-sm-pull-10 { - right: 83.33333333333334%; - } - .col-sm-pull-11 { - right: 91.66666666666666%; - } - .col-sm-offset-1 { - margin-left: 8.333333333333332%; - } - .col-sm-offset-2 { - margin-left: 16.666666666666664%; - } - .col-sm-offset-3 { - margin-left: 25%; - } - .col-sm-offset-4 { - margin-left: 33.33333333333333%; - } - .col-sm-offset-5 { - margin-left: 41.66666666666667%; - } - .col-sm-offset-6 { - margin-left: 50%; - } - .col-sm-offset-7 { - margin-left: 58.333333333333336%; - } - .col-sm-offset-8 { - margin-left: 66.66666666666666%; - } - .col-sm-offset-9 { - margin-left: 75%; - } - .col-sm-offset-10 { - margin-left: 83.33333333333334%; - } - .col-sm-offset-11 { - margin-left: 91.66666666666666%; - } -} -@media (min-width: 992px) { - .container { - max-width: 970px; - } - .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 { - float: left; - } - .col-md-1 { - width: 8.333333333333332%; - } - .col-md-2 { - width: 16.666666666666664%; - } - .col-md-3 { - width: 25%; - } - .col-md-4 { - width: 33.33333333333333%; - } - .col-md-5 { - width: 41.66666666666667%; - } - .col-md-6 { - width: 50%; - } - .col-md-7 { - width: 58.333333333333336%; - } - .col-md-8 { - width: 66.66666666666666%; - } - .col-md-9 { - width: 75%; - } - .col-md-10 { - width: 83.33333333333334%; - } - .col-md-11 { - width: 91.66666666666666%; - } - .col-md-12 { - width: 100%; - } - .col-md-push-0 { - left: auto; - } - .col-md-push-1 { - left: 8.333333333333332%; - } - .col-md-push-2 { - left: 16.666666666666664%; - } - .col-md-push-3 { - left: 25%; - } - .col-md-push-4 { - left: 33.33333333333333%; - } - .col-md-push-5 { - left: 41.66666666666667%; - } - .col-md-push-6 { - left: 50%; - } - .col-md-push-7 { - left: 58.333333333333336%; - } - .col-md-push-8 { - left: 66.66666666666666%; - } - .col-md-push-9 { - left: 75%; - } - .col-md-push-10 { - left: 83.33333333333334%; - } - .col-md-push-11 { - left: 91.66666666666666%; - } - .col-md-pull-0 { - right: auto; - } - .col-md-pull-1 { - right: 8.333333333333332%; - } - .col-md-pull-2 { - right: 16.666666666666664%; - } - .col-md-pull-3 { - right: 25%; - } - .col-md-pull-4 { - right: 33.33333333333333%; - } - .col-md-pull-5 { - right: 41.66666666666667%; - } - .col-md-pull-6 { - right: 50%; - } - .col-md-pull-7 { - right: 58.333333333333336%; - } - .col-md-pull-8 { - right: 66.66666666666666%; - } - .col-md-pull-9 { - right: 75%; - } - .col-md-pull-10 { - right: 83.33333333333334%; - } - .col-md-pull-11 { - right: 91.66666666666666%; - } - .col-md-offset-0 { - margin-left: 0; - } - .col-md-offset-1 { - margin-left: 8.333333333333332%; - } - .col-md-offset-2 { - margin-left: 16.666666666666664%; - } - .col-md-offset-3 { - margin-left: 25%; - } - .col-md-offset-4 { - margin-left: 33.33333333333333%; - } - .col-md-offset-5 { - margin-left: 41.66666666666667%; - } - .col-md-offset-6 { - margin-left: 50%; - } - .col-md-offset-7 { - margin-left: 58.333333333333336%; - } - .col-md-offset-8 { - margin-left: 66.66666666666666%; - } - .col-md-offset-9 { - margin-left: 75%; - } - .col-md-offset-10 { - margin-left: 83.33333333333334%; - } - .col-md-offset-11 { - margin-left: 91.66666666666666%; - } -} -@media (min-width: 1200px) { - .container { - max-width: 1170px; - } - .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 { - float: left; - } - .col-lg-1 { - width: 8.333333333333332%; - } - .col-lg-2 { - width: 16.666666666666664%; - } - .col-lg-3 { - width: 25%; - } - .col-lg-4 { - width: 33.33333333333333%; - } - .col-lg-5 { - width: 41.66666666666667%; - } - .col-lg-6 { - width: 50%; - } - .col-lg-7 { - width: 58.333333333333336%; - } - .col-lg-8 { - width: 66.66666666666666%; - } - .col-lg-9 { - width: 75%; - } - .col-lg-10 { - width: 83.33333333333334%; - } - .col-lg-11 { - width: 91.66666666666666%; - } - .col-lg-12 { - width: 100%; - } - .col-lg-push-0 { - left: auto; - } - .col-lg-push-1 { - left: 8.333333333333332%; - } - .col-lg-push-2 { - left: 16.666666666666664%; - } - .col-lg-push-3 { - left: 25%; - } - .col-lg-push-4 { - left: 33.33333333333333%; - } - .col-lg-push-5 { - left: 41.66666666666667%; - } - .col-lg-push-6 { - left: 50%; - } - .col-lg-push-7 { - left: 58.333333333333336%; - } - .col-lg-push-8 { - left: 66.66666666666666%; - } - .col-lg-push-9 { - left: 75%; - } - .col-lg-push-10 { - left: 83.33333333333334%; - } - .col-lg-push-11 { - left: 91.66666666666666%; - } - .col-lg-pull-0 { - right: auto; - } - .col-lg-pull-1 { - right: 8.333333333333332%; - } - .col-lg-pull-2 { - right: 16.666666666666664%; - } - .col-lg-pull-3 { - right: 25%; - } - .col-lg-pull-4 { - right: 33.33333333333333%; - } - .col-lg-pull-5 { - right: 41.66666666666667%; - } - .col-lg-pull-6 { - right: 50%; - } - .col-lg-pull-7 { - right: 58.333333333333336%; - } - .col-lg-pull-8 { - right: 66.66666666666666%; - } - .col-lg-pull-9 { - right: 75%; - } - .col-lg-pull-10 { - right: 83.33333333333334%; - } - .col-lg-pull-11 { - right: 91.66666666666666%; - } - .col-lg-offset-0 { - margin-left: 0; - } - .col-lg-offset-1 { - margin-left: 8.333333333333332%; - } - .col-lg-offset-2 { - margin-left: 16.666666666666664%; - } - .col-lg-offset-3 { - margin-left: 25%; - } - .col-lg-offset-4 { - margin-left: 33.33333333333333%; - } - .col-lg-offset-5 { - margin-left: 41.66666666666667%; - } - .col-lg-offset-6 { - margin-left: 50%; - } - .col-lg-offset-7 { - margin-left: 58.333333333333336%; - } - .col-lg-offset-8 { - margin-left: 66.66666666666666%; - } - .col-lg-offset-9 { - margin-left: 75%; - } - .col-lg-offset-10 { - margin-left: 83.33333333333334%; - } - .col-lg-offset-11 { - margin-left: 91.66666666666666%; - } -} -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.428571429; - vertical-align: top; - border-top: 1px solid #dddddd; -} -.table thead > tr > th { - vertical-align: bottom; - border-bottom: 2px solid #dddddd; -} -.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 #dddddd; -} -.table .table { - background-color: #ffffff; -} -.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 #dddddd; -} -.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 #dddddd; -} -.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-"] { - float: none; - display: table-column; -} -table td[class*="col-"], -table th[class*="col-"] { - 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 > 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; - border-color: #d6e9c6; -} -.table-hover > tbody > tr > td.success:hover, -.table-hover > tbody > tr > th.success:hover, -.table-hover > tbody > tr.success:hover > td { - background-color: #d0e9c6; - border-color: #c9e2b3; -} -.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; - border-color: #eed3d7; -} -.table-hover > tbody > tr > td.danger:hover, -.table-hover > tbody > tr > th.danger:hover, -.table-hover > tbody > tr.danger:hover > td { - background-color: #ebcccc; - border-color: #e6c1c7; -} -.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; - border-color: #fbeed5; -} -.table-hover > tbody > tr > td.warning:hover, -.table-hover > tbody > tr > th.warning:hover, -.table-hover > tbody > tr.warning:hover > td { - background-color: #faf2cc; - border-color: #f8e5be; -} -@media (max-width: 768px) { - .table-responsive { - width: 100%; - margin-bottom: 15px; - overflow-y: hidden; - overflow-x: scroll; - border: 1px solid #dddddd; - } - .table-responsive > .table { - margin-bottom: 0; - background-color: #fff; - } - .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 > thead > tr:last-child > th, - .table-responsive > .table-bordered > tbody > tr:last-child > th, - .table-responsive > .table-bordered > tfoot > tr:last-child > th, - .table-responsive > .table-bordered > thead > tr:last-child > td, - .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; -} -legend { - display: block; - width: 100%; - padding: 0; - margin-bottom: 20px; - font-size: 21px; - line-height: inherit; - color: #333333; - border: 0; - border-bottom: 1px solid #e5e5e5; -} -label { - display: inline-block; - margin-bottom: 5px; - font-weight: bold; -} -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; - /* IE8-9 */ - - line-height: normal; -} -input[type="file"] { - display: block; -} -select[multiple], -select[size] { - height: auto; -} -select optgroup { - font-size: inherit; - font-style: inherit; - font-family: inherit; -} -input[type="file"]:focus, -input[type="radio"]:focus, -input[type="checkbox"]:focus { - outline: thin dotted #333; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} -input[type="number"]::-webkit-outer-spin-button, -input[type="number"]::-webkit-inner-spin-button { - height: auto; -} -.form-control:-moz-placeholder { - color: #999999; -} -.form-control::-moz-placeholder { - color: #999999; -} -.form-control:-ms-input-placeholder { - color: #999999; -} -.form-control::-webkit-input-placeholder { - color: #999999; -} -.form-control { - display: block; - width: 100%; - height: 34px; - padding: 6px 12px; - font-size: 14px; - line-height: 1.428571429; - color: #555555; - vertical-align: middle; - background-color: #ffffff; - border: 1px solid #cccccc; - border-radius: 4px; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 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, 0.6); - box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6); -} -.form-control[disabled], -.form-control[readonly], -fieldset[disabled] .form-control { - cursor: not-allowed; - background-color: #eeeeee; -} -textarea.form-control { - height: auto; -} -.form-group { - margin-bottom: 15px; -} -.radio, -.checkbox { - display: block; - min-height: 20px; - margin-top: 10px; - margin-bottom: 10px; - padding-left: 20px; - vertical-align: middle; -} -.radio label, -.checkbox label { - display: inline; - margin-bottom: 0; - font-weight: normal; - 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: normal; - 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 { - height: auto; -} -.input-lg { - height: 45px; - padding: 10px 16px; - font-size: 18px; - line-height: 1.33; - border-radius: 6px; -} -select.input-lg { - height: 45px; - line-height: 45px; -} -textarea.input-lg { - height: auto; -} -.has-warning .help-block, -.has-warning .control-label { - color: #c09853; -} -.has-warning .form-control { - border-color: #c09853; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -} -.has-warning .form-control:focus { - border-color: #a47e3c; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; -} -.has-warning .input-group-addon { - color: #c09853; - border-color: #c09853; - background-color: #fcf8e3; -} -.has-error .help-block, -.has-error .control-label { - color: #b94a48; -} -.has-error .form-control { - border-color: #b94a48; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -} -.has-error .form-control:focus { - border-color: #953b39; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; -} -.has-error .input-group-addon { - color: #b94a48; - border-color: #b94a48; - background-color: #f2dede; -} -.has-success .help-block, -.has-success .control-label { - color: #468847; -} -.has-success .form-control { - border-color: #468847; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -} -.has-success .form-control:focus { - border-color: #356635; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; -} -.has-success .input-group-addon { - color: #468847; - border-color: #468847; - background-color: #dff0d8; -} -.form-control-static { - margin-bottom: 0; - padding-top: 7px; -} -.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; - } - .form-inline .radio, - .form-inline .checkbox { - display: inline-block; - margin-top: 0; - margin-bottom: 0; - padding-left: 0; - } - .form-inline .radio input[type="radio"], - .form-inline .checkbox input[type="checkbox"] { - float: none; - margin-left: 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 .form-group { - margin-left: -15px; - margin-right: -15px; -} -.form-horizontal .form-group:before, -.form-horizontal .form-group:after { - content: " "; - /* 1 */ - - display: table; - /* 2 */ - -} -.form-horizontal .form-group:after { - clear: both; -} -.form-horizontal .form-group:before, -.form-horizontal .form-group:after { - content: " "; - /* 1 */ - - display: table; - /* 2 */ - -} -.form-horizontal .form-group:after { - clear: both; -} -@media (min-width: 768px) { - .form-horizontal .control-label { - text-align: right; - } -} -.btn { - display: inline-block; - padding: 6px 12px; - margin-bottom: 0; - font-size: 14px; - font-weight: normal; - line-height: 1.428571429; - text-align: center; - vertical-align: middle; - cursor: pointer; - border: 1px solid transparent; - border-radius: 4px; - white-space: nowrap; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - -o-user-select: none; - user-select: none; -} -.btn:focus { - outline: thin dotted #333; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} -.btn:hover, -.btn:focus { - color: #333333; - text-decoration: none; -} -.btn:active, -.btn.active { - outline: 0; - background-image: none; - -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); - box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); -} -.btn.disabled, -.btn[disabled], -fieldset[disabled] .btn { - cursor: not-allowed; - pointer-events: none; - opacity: 0.65; - filter: alpha(opacity=65); - -webkit-box-shadow: none; - box-shadow: none; -} -.btn-default { - color: #333333; - background-color: #ffffff; - border-color: #cccccc; -} -.btn-default:hover, -.btn-default:focus, -.btn-default:active, -.btn-default.active, -.open .dropdown-toggle.btn-default { - color: #333333; - 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: #ffffff; - border-color: #cccccc; -} -.btn-primary { - color: #ffffff; - background-color: #428bca; - border-color: #357ebd; -} -.btn-primary:hover, -.btn-primary:focus, -.btn-primary:active, -.btn-primary.active, -.open .dropdown-toggle.btn-primary { - color: #ffffff; - 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-warning { - color: #ffffff; - background-color: #f0ad4e; - border-color: #eea236; -} -.btn-warning:hover, -.btn-warning:focus, -.btn-warning:active, -.btn-warning.active, -.open .dropdown-toggle.btn-warning { - color: #ffffff; - 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-danger { - color: #ffffff; - background-color: #d9534f; - border-color: #d43f3a; -} -.btn-danger:hover, -.btn-danger:focus, -.btn-danger:active, -.btn-danger.active, -.open .dropdown-toggle.btn-danger { - color: #ffffff; - 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-success { - color: #ffffff; - background-color: #5cb85c; - border-color: #4cae4c; -} -.btn-success:hover, -.btn-success:focus, -.btn-success:active, -.btn-success.active, -.open .dropdown-toggle.btn-success { - color: #ffffff; - 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-info { - color: #ffffff; - background-color: #5bc0de; - border-color: #46b8da; -} -.btn-info:hover, -.btn-info:focus, -.btn-info:active, -.btn-info.active, -.open .dropdown-toggle.btn-info { - color: #ffffff; - 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-link { - color: #428bca; - font-weight: normal; - 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: #999999; - text-decoration: none; -} -.btn-lg { - padding: 10px 16px; - font-size: 18px; - line-height: 1.33; - border-radius: 6px; -} -.btn-sm, -.btn-xs { - padding: 5px 10px; - font-size: 12px; - line-height: 1.5; - border-radius: 3px; -} -.btn-xs { - padding: 1px 5px; -} -.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 0.15s linear; - transition: opacity 0.15s linear; -} -.fade.in { - opacity: 1; -} -.collapse { - display: none; -} -.collapse.in { - display: block; -} -.collapsing { - position: relative; - height: 0; - overflow: hidden; - -webkit-transition: height 0.35s ease; - transition: height 0.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: normal; - line-height: 1; - -webkit-font-smoothing: antialiased; -} -.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-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-print:before { - content: "\e045"; -} -.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-eye-open:before { - content: "\e105"; -} -.glyphicon-eye-close:before { - content: "\e106"; -} -.glyphicon-warning-sign:before { - content: "\e107"; -} -.glyphicon-plane:before { - content: "\e108"; -} -.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-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-tasks:before { - content: "\e137"; -} -.glyphicon-filter:before { - content: "\e138"; -} -.glyphicon-fullscreen:before { - content: "\e140"; -} -.glyphicon-dashboard:before { - content: "\e141"; -} -.glyphicon-heart-empty:before { - content: "\e143"; -} -.glyphicon-link:before { - content: "\e144"; -} -.glyphicon-phone:before { - content: "\e145"; -} -.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"; -} -.glyphicon-briefcase:before { - content: "\1f4bc"; -} -.glyphicon-calendar:before { - content: "\1f4c5"; -} -.glyphicon-pushpin:before { - content: "\1f4cc"; -} -.glyphicon-paperclip:before { - content: "\1f4ce"; -} -.glyphicon-camera:before { - content: "\1f4f7"; -} -.glyphicon-lock:before { - content: "\1f512"; -} -.glyphicon-bell:before { - content: "\1f514"; -} -.glyphicon-bookmark:before { - content: "\1f516"; -} -.glyphicon-fire:before { - content: "\1f525"; -} -.glyphicon-wrench:before { - content: "\1f527"; -} -.caret { - display: inline-block; - width: 0; - height: 0; - margin-left: 2px; - vertical-align: middle; - border-top: 4px solid #000000; - border-right: 4px solid transparent; - border-left: 4px solid transparent; - border-bottom: 0 dotted; - content: ""; -} -.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: #ffffff; - border: 1px solid #cccccc; - border: 1px solid rgba(0, 0, 0, 0.15); - border-radius: 4px; - -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); - box-shadow: 0 6px 12px rgba(0, 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: normal; - line-height: 1.428571429; - color: #333333; - white-space: nowrap; -} -.dropdown-menu > li > a:hover, -.dropdown-menu > li > a:focus { - text-decoration: none; - color: #ffffff; - background-color: #428bca; -} -.dropdown-menu > .active > a, -.dropdown-menu > .active > a:hover, -.dropdown-menu > .active > a:focus { - color: #ffffff; - text-decoration: none; - outline: 0; - background-color: #428bca; -} -.dropdown-menu > .disabled > a, -.dropdown-menu > .disabled > a:hover, -.dropdown-menu > .disabled > a:focus { - color: #999999; -} -.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-header { - display: block; - padding: 3px 20px; - font-size: 12px; - line-height: 1.428571429; - color: #999999; -} -.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 dotted; - border-bottom: 4px solid #000000; - content: ""; -} -.dropup .dropdown-menu, -.navbar-fixed-bottom .dropdown .dropdown-menu { - top: auto; - bottom: 100%; - margin-bottom: 1px; -} -@media (min-width: 992px) { - .navbar-right .dropdown-menu { - right: 0; - left: auto; - } -} -.btn-default .caret { - border-top-color: #333333; -} -.btn-primary .caret, -.btn-success .caret, -.btn-warning .caret, -.btn-danger .caret, -.btn-info .caret { - border-top-color: #fff; -} -.dropup .btn-default .caret { - border-bottom-color: #333333; -} -.dropup .btn-primary .caret, -.dropup .btn-success .caret, -.dropup .btn-warning .caret, -.dropup .btn-danger .caret, -.dropup .btn-info .caret { - border-bottom-color: #fff; -} -.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: none; -} -.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:before, -.btn-toolbar:after { - content: " "; - /* 1 */ - - display: table; - /* 2 */ - -} -.btn-toolbar:after { - clear: both; -} -.btn-toolbar:before, -.btn-toolbar:after { - content: " "; - /* 1 */ - - display: table; - /* 2 */ - -} -.btn-toolbar:after { - clear: both; -} -.btn-toolbar .btn-group { - float: left; -} -.btn-toolbar > .btn + .btn, -.btn-toolbar > .btn-group + .btn, -.btn-toolbar > .btn + .btn-group, -.btn-toolbar > .btn-group + .btn-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-xs > .btn { - padding: 5px 10px; - font-size: 12px; - line-height: 1.5; - border-radius: 3px; - padding: 1px 5px; -} -.btn-group-sm > .btn { - padding: 5px 10px; - font-size: 12px; - line-height: 1.5; - border-radius: 3px; -} -.btn-group-lg > .btn { - padding: 10px 16px; - font-size: 18px; - line-height: 1.33; - border-radius: 6px; -} -.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, 0.125); - box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); -} -.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 { - display: block; - float: none; - width: 100%; - max-width: 100%; -} -.btn-group-vertical > .btn-group:before, -.btn-group-vertical > .btn-group:after { - content: " "; - /* 1 */ - - display: table; - /* 2 */ - -} -.btn-group-vertical > .btn-group:after { - clear: both; -} -.btn-group-vertical > .btn-group:before, -.btn-group-vertical > .btn-group:after { - content: " "; - /* 1 */ - - display: table; - /* 2 */ - -} -.btn-group-vertical > .btn-group:after { - clear: both; -} -.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 > .btn:last-child, -.btn-group-vertical > .btn-group:first-child > .dropdown-toggle { - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; -} -.btn-group-vertical > .btn-group:last-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 { - float: none; - display: table-cell; - width: 1%; -} -[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.col { - float: none; - padding-left: 0; - padding-right: 0; -} -.input-group .form-control { - width: 100%; - margin-bottom: 0; -} -.input-group-lg > .form-control, -.input-group-lg > .input-group-addon, -.input-group-lg > .input-group-btn > .btn { - height: 45px; - 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: 45px; - line-height: 45px; -} -textarea.input-group-lg > .form-control, -textarea.input-group-lg > .input-group-addon, -textarea.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 { - 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: normal; - line-height: 1; - text-align: center; - background-color: #eeeeee; - border: 1px solid #cccccc; - 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 > .dropdown-toggle, -.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle) { - 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 > .dropdown-toggle, -.input-group-btn:first-child > .btn:not(:first-child) { - border-bottom-left-radius: 0; - border-top-left-radius: 0; -} -.input-group-addon:last-child { - border-left: 0; -} -.input-group-btn { - position: relative; - white-space: nowrap; -} -.input-group-btn > .btn { - position: relative; -} -.input-group-btn > .btn + .btn { - margin-left: -4px; -} -.input-group-btn > .btn:hover, -.input-group-btn > .btn:active { - z-index: 2; -} -.nav { - margin-bottom: 0; - padding-left: 0; - list-style: none; -} -.nav:before, -.nav:after { - content: " "; - /* 1 */ - - display: table; - /* 2 */ - -} -.nav:after { - clear: both; -} -.nav:before, -.nav:after { - content: " "; - /* 1 */ - - display: table; - /* 2 */ - -} -.nav:after { - clear: both; -} -.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: #eeeeee; -} -.nav > li.disabled > a { - color: #999999; -} -.nav > li.disabled > a:hover, -.nav > li.disabled > a:focus { - color: #999999; - text-decoration: none; - background-color: transparent; - cursor: not-allowed; -} -.nav .open > a, -.nav .open > a:hover, -.nav .open > a:focus { - background-color: #eeeeee; - 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 #dddddd; -} -.nav-tabs > li { - float: left; - margin-bottom: -1px; -} -.nav-tabs > li > a { - margin-right: 2px; - line-height: 1.428571429; - border: 1px solid transparent; - border-radius: 4px 4px 0 0; -} -.nav-tabs > li > a:hover { - border-color: #eeeeee #eeeeee #dddddd; -} -.nav-tabs > li.active > a, -.nav-tabs > li.active > a:hover, -.nav-tabs > li.active > a:focus { - color: #555555; - background-color: #ffffff; - border: 1px solid #dddddd; - 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; -} -@media (min-width: 768px) { - .nav-tabs.nav-justified > li { - display: table-cell; - width: 1%; - } -} -.nav-tabs.nav-justified > li > a { - border-bottom: 1px solid #dddddd; - margin-right: 0; -} -.nav-tabs.nav-justified > .active > a { - border-bottom-color: #ffffff; -} -.nav-pills > li { - float: left; -} -.nav-pills > li > a { - border-radius: 5px; -} -.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: #ffffff; - 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; -} -@media (min-width: 768px) { - .nav-justified > li { - display: table-cell; - width: 1%; - } -} -.nav-tabs-justified { - border-bottom: 0; -} -.nav-tabs-justified > li > a { - border-bottom: 1px solid #dddddd; - margin-right: 0; -} -.nav-tabs-justified > .active > a { - border-bottom-color: #ffffff; -} -.tabbable:before, -.tabbable:after { - content: " "; - /* 1 */ - - display: table; - /* 2 */ - -} -.tabbable:after { - clear: both; -} -.tabbable:before, -.tabbable:after { - content: " "; - /* 1 */ - - display: table; - /* 2 */ - -} -.tabbable:after { - clear: both; -} -.tab-content > .tab-pane, -.pill-content > .pill-pane { - display: none; -} -.tab-content > .active, -.pill-content > .active { - display: block; -} -.nav .caret { - border-top-color: #428bca; - border-bottom-color: #428bca; -} -.nav a:hover .caret { - border-top-color: #2a6496; - border-bottom-color: #2a6496; -} -.nav-tabs .dropdown-menu { - margin-top: -1px; - border-top-right-radius: 0; - border-top-left-radius: 0; -} -.navbar { - position: relative; - z-index: 1000; - min-height: 50px; - margin-bottom: 20px; - border: 1px solid transparent; -} -.navbar:before, -.navbar:after { - content: " "; - /* 1 */ - - display: table; - /* 2 */ - -} -.navbar:after { - clear: both; -} -.navbar:before, -.navbar:after { - content: " "; - /* 1 */ - - display: table; - /* 2 */ - -} -.navbar:after { - clear: both; -} -@media (min-width: 992px) { - .navbar { - border-radius: 4px; - } -} -.navbar-header:before, -.navbar-header:after { - content: " "; - /* 1 */ - - display: table; - /* 2 */ - -} -.navbar-header:after { - clear: both; -} -.navbar-header:before, -.navbar-header:after { - content: " "; - /* 1 */ - - display: table; - /* 2 */ - -} -.navbar-header:after { - clear: both; -} -@media (min-width: 992px) { - .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, 0.1); - -webkit-overflow-scrolling: touch; -} -.navbar-collapse:before, -.navbar-collapse:after { - content: " "; - /* 1 */ - - display: table; - /* 2 */ - -} -.navbar-collapse:after { - clear: both; -} -.navbar-collapse:before, -.navbar-collapse:after { - content: " "; - /* 1 */ - - display: table; - /* 2 */ - -} -.navbar-collapse:after { - clear: both; -} -.navbar-collapse.in { - overflow-y: auto; -} -@media (min-width: 992px) { - .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-collapse .navbar-nav.navbar-left:first-child { - margin-left: -15px; - } - .navbar-collapse .navbar-nav.navbar-right:last-child { - margin-right: -15px; - } - .navbar-collapse .navbar-text:last-child { - margin-right: 0; - } -} -.container > .navbar-header, -.container > .navbar-collapse { - margin-right: -15px; - margin-left: -15px; -} -@media (min-width: 992px) { - .container > .navbar-header, - .container > .navbar-collapse { - margin-right: 0; - margin-left: 0; - } -} -.navbar-static-top { - border-width: 0 0 1px; -} -@media (min-width: 992px) { - .navbar-static-top { - border-radius: 0; - } -} -.navbar-fixed-top, -.navbar-fixed-bottom { - position: fixed; - right: 0; - left: 0; - border-width: 0 0 1px; -} -@media (min-width: 992px) { - .navbar-fixed-top, - .navbar-fixed-bottom { - border-radius: 0; - } -} -.navbar-fixed-top { - z-index: 1030; - top: 0; -} -.navbar-fixed-bottom { - bottom: 0; - margin-bottom: 0; -} -.navbar-brand { - float: left; - padding: 15px 15px; - font-size: 18px; - line-height: 20px; -} -.navbar-brand:hover, -.navbar-brand:focus { - text-decoration: none; -} -@media (min-width: 992px) { - .navbar > .container .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; - border: 1px solid transparent; - border-radius: 4px; -} -.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: 992px) { - .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: 992px) { - .navbar-nav { - float: left; - margin: 0; - } - .navbar-nav > li { - float: left; - } - .navbar-nav > li > a { - padding-top: 15px; - padding-bottom: 15px; - } -} -@media (min-width: 992px) { - .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, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.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; - } - .navbar-form .radio, - .navbar-form .checkbox { - display: inline-block; - margin-top: 0; - margin-bottom: 0; - padding-left: 0; - } - .navbar-form .radio input[type="radio"], - .navbar-form .checkbox input[type="checkbox"] { - float: none; - margin-left: 0; - } -} -@media (max-width: 767px) { - .navbar-form .form-group { - margin-bottom: 5px; - } -} -@media (min-width: 992px) { - .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-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-nav.pull-right > li > .dropdown-menu, -.navbar-nav > li > .dropdown-menu.pull-right { - left: auto; - right: 0; -} -.navbar-btn { - margin-top: 8px; - margin-bottom: 8px; -} -.navbar-text { - float: left; - margin-top: 15px; - margin-bottom: 15px; -} -@media (min-width: 992px) { - .navbar-text { - margin-left: 15px; - margin-right: 15px; - } -} -.navbar-default { - background-color: #f8f8f8; - border-color: #e7e7e7; -} -.navbar-default .navbar-brand { - color: #777777; -} -.navbar-default .navbar-brand:hover, -.navbar-default .navbar-brand:focus { - color: #5e5e5e; - background-color: transparent; -} -.navbar-default .navbar-text { - color: #777777; -} -.navbar-default .navbar-nav > li > a { - color: #777777; -} -.navbar-default .navbar-nav > li > a:hover, -.navbar-default .navbar-nav > li > a:focus { - color: #333333; - background-color: transparent; -} -.navbar-default .navbar-nav > .active > a, -.navbar-default .navbar-nav > .active > a:hover, -.navbar-default .navbar-nav > .active > a:focus { - color: #555555; - background-color: #e7e7e7; -} -.navbar-default .navbar-nav > .disabled > a, -.navbar-default .navbar-nav > .disabled > a:hover, -.navbar-default .navbar-nav > .disabled > a:focus { - color: #cccccc; - background-color: transparent; -} -.navbar-default .navbar-toggle { - border-color: #dddddd; -} -.navbar-default .navbar-toggle:hover, -.navbar-default .navbar-toggle:focus { - background-color: #dddddd; -} -.navbar-default .navbar-toggle .icon-bar { - background-color: #cccccc; -} -.navbar-default .navbar-collapse, -.navbar-default .navbar-form { - border-color: #e6e6e6; -} -.navbar-default .navbar-nav > .dropdown > a:hover .caret, -.navbar-default .navbar-nav > .dropdown > a:focus .caret { - border-top-color: #333333; - border-bottom-color: #333333; -} -.navbar-default .navbar-nav > .open > a, -.navbar-default .navbar-nav > .open > a:hover, -.navbar-default .navbar-nav > .open > a:focus { - background-color: #e7e7e7; - color: #555555; -} -.navbar-default .navbar-nav > .open > a .caret, -.navbar-default .navbar-nav > .open > a:hover .caret, -.navbar-default .navbar-nav > .open > a:focus .caret { - border-top-color: #555555; - border-bottom-color: #555555; -} -.navbar-default .navbar-nav > .dropdown > a .caret { - border-top-color: #777777; - border-bottom-color: #777777; -} -@media (max-width: 767px) { - .navbar-default .navbar-nav .open .dropdown-menu > li > a { - color: #777777; - } - .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover, - .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus { - color: #333333; - 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: #555555; - 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: #cccccc; - background-color: transparent; - } -} -.navbar-default .navbar-link { - color: #777777; -} -.navbar-default .navbar-link:hover { - color: #333333; -} -.navbar-inverse { - background-color: #222222; - border-color: #080808; -} -.navbar-inverse .navbar-brand { - color: #999999; -} -.navbar-inverse .navbar-brand:hover, -.navbar-inverse .navbar-brand:focus { - color: #ffffff; - background-color: transparent; -} -.navbar-inverse .navbar-text { - color: #999999; -} -.navbar-inverse .navbar-nav > li > a { - color: #999999; -} -.navbar-inverse .navbar-nav > li > a:hover, -.navbar-inverse .navbar-nav > li > a:focus { - color: #ffffff; - background-color: transparent; -} -.navbar-inverse .navbar-nav > .active > a, -.navbar-inverse .navbar-nav > .active > a:hover, -.navbar-inverse .navbar-nav > .active > a:focus { - color: #ffffff; - background-color: #080808; -} -.navbar-inverse .navbar-nav > .disabled > a, -.navbar-inverse .navbar-nav > .disabled > a:hover, -.navbar-inverse .navbar-nav > .disabled > a:focus { - color: #444444; - background-color: transparent; -} -.navbar-inverse .navbar-toggle { - border-color: #333333; -} -.navbar-inverse .navbar-toggle:hover, -.navbar-inverse .navbar-toggle:focus { - background-color: #333333; -} -.navbar-inverse .navbar-toggle .icon-bar { - background-color: #ffffff; -} -.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: #ffffff; -} -.navbar-inverse .navbar-nav > .dropdown > a:hover .caret { - border-top-color: #ffffff; - border-bottom-color: #ffffff; -} -.navbar-inverse .navbar-nav > .dropdown > a .caret { - border-top-color: #999999; - border-bottom-color: #999999; -} -.navbar-inverse .navbar-nav > .open > a .caret, -.navbar-inverse .navbar-nav > .open > a:hover .caret, -.navbar-inverse .navbar-nav > .open > a:focus .caret { - border-top-color: #ffffff; - border-bottom-color: #ffffff; -} -@media (max-width: 767px) { - .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header { - border-color: #080808; - } - .navbar-inverse .navbar-nav .open .dropdown-menu > li > a { - color: #999999; - } - .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover, - .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus { - color: #ffffff; - 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: #ffffff; - 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: #444444; - background-color: transparent; - } -} -.navbar-inverse .navbar-link { - color: #999999; -} -.navbar-inverse .navbar-link:hover { - color: #ffffff; -} -.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: #cccccc; -} -.breadcrumb > .active { - color: #999999; -} -.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.428571429; - text-decoration: none; - background-color: #ffffff; - border: 1px solid #dddddd; - 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 { - background-color: #eeeeee; -} -.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: #ffffff; - background-color: #428bca; - border-color: #428bca; - cursor: default; -} -.pagination > .disabled > span, -.pagination > .disabled > a, -.pagination > .disabled > a:hover, -.pagination > .disabled > a:focus { - color: #999999; - background-color: #ffffff; - border-color: #dddddd; - 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:before, -.pager:after { - content: " "; - /* 1 */ - - display: table; - /* 2 */ - -} -.pager:after { - clear: both; -} -.pager:before, -.pager:after { - content: " "; - /* 1 */ - - display: table; - /* 2 */ - -} -.pager:after { - clear: both; -} -.pager li { - display: inline; -} -.pager li > a, -.pager li > span { - display: inline-block; - padding: 5px 14px; - background-color: #ffffff; - border: 1px solid #dddddd; - border-radius: 15px; -} -.pager li > a:hover, -.pager li > a:focus { - text-decoration: none; - background-color: #eeeeee; -} -.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: #999999; - background-color: #ffffff; - cursor: not-allowed; -} -.label { - display: inline; - padding: .2em .6em .3em; - font-size: 75%; - font-weight: bold; - line-height: 1; - color: #ffffff; - text-align: center; - white-space: nowrap; - vertical-align: baseline; - border-radius: .25em; -} -.label[href]:hover, -.label[href]:focus { - color: #ffffff; - text-decoration: none; - cursor: pointer; -} -.label:empty { - display: none; -} -.label-default { - background-color: #999999; -} -.label-default[href]:hover, -.label-default[href]:focus { - background-color: #808080; -} -.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: bold; - color: #ffffff; - line-height: 1; - vertical-align: baseline; - white-space: nowrap; - text-align: center; - background-color: #999999; - border-radius: 10px; -} -.badge:empty { - display: none; -} -a.badge:hover, -a.badge:focus { - color: #ffffff; - text-decoration: none; - cursor: pointer; -} -.btn .badge { - position: relative; - top: -1px; -} -a.list-group-item.active > .badge, -.nav-pills > .active > a > .badge { - color: #428bca; - background-color: #ffffff; -} -.nav-pills > li > a > .badge { - margin-left: 3px; -} -.jumbotron { - padding: 30px; - margin-bottom: 30px; - font-size: 21px; - font-weight: 200; - line-height: 2.1428571435; - color: inherit; - background-color: #eeeeee; -} -.jumbotron h1 { - line-height: 1; - color: inherit; -} -.jumbotron p { - line-height: 1.4; -} -.container .jumbotron { - border-radius: 6px; -} -@media screen and (min-width: 768px) { - .jumbotron { - padding-top: 48px; - padding-bottom: 48px; - } - .container .jumbotron { - padding-left: 60px; - padding-right: 60px; - } - .jumbotron h1 { - font-size: 63px; - } -} -.thumbnail { - padding: 4px; - line-height: 1.428571429; - background-color: #ffffff; - border: 1px solid #dddddd; - border-radius: 4px; - -webkit-transition: all 0.2s ease-in-out; - transition: all 0.2s ease-in-out; - display: inline-block; - max-width: 100%; - height: auto; - display: block; -} -.thumbnail > img { - display: block; - max-width: 100%; - height: auto; -} -a.thumbnail:hover, -a.thumbnail:focus { - border-color: #428bca; -} -.thumbnail > img { - margin-left: auto; - margin-right: auto; -} -.thumbnail .caption { - padding: 9px; - color: #333333; -} -.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: bold; -} -.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: #468847; -} -.alert-success hr { - border-top-color: #c9e2b3; -} -.alert-success .alert-link { - color: #356635; -} -.alert-info { - background-color: #d9edf7; - border-color: #bce8f1; - color: #3a87ad; -} -.alert-info hr { - border-top-color: #a6e1ec; -} -.alert-info .alert-link { - color: #2d6987; -} -.alert-warning { - background-color: #fcf8e3; - border-color: #fbeed5; - color: #c09853; -} -.alert-warning hr { - border-top-color: #f8e5be; -} -.alert-warning .alert-link { - color: #a47e3c; -} -.alert-danger { - background-color: #f2dede; - border-color: #eed3d7; - color: #b94a48; -} -.alert-danger hr { - border-top-color: #e6c1c7; -} -.alert-danger .alert-link { - color: #953b39; -} -@-webkit-keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} -@-moz-keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} -@-o-keyframes progress-bar-stripes { - from { - background-position: 0 0; - } - to { - background-position: 40px 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, 0.1); - box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); -} -.progress-bar { - float: left; - width: 0%; - height: 100%; - font-size: 12px; - color: #ffffff; - text-align: center; - background-color: #428bca; - -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); - box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); - -webkit-transition: width 0.6s ease; - transition: width 0.6s ease; -} -.progress-striped .progress-bar { - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-size: 40px 40px; -} -.progress.active .progress-bar { - -webkit-animation: progress-bar-stripes 2s linear infinite; - -moz-animation: progress-bar-stripes 2s linear infinite; - -ms-animation: progress-bar-stripes 2s linear infinite; - -o-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-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} -.progress-bar-info { - background-color: #5bc0de; -} -.progress-striped .progress-bar-info { - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} -.progress-bar-warning { - background-color: #f0ad4e; -} -.progress-striped .progress-bar-warning { - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} -.progress-bar-danger { - background-color: #d9534f; -} -.progress-striped .progress-bar-danger { - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.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: #ffffff; - border: 1px solid #dddddd; -} -.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: #555555; -} -a.list-group-item .list-group-item-heading { - color: #333333; -} -a.list-group-item:hover, -a.list-group-item:focus { - text-decoration: none; - background-color: #f5f5f5; -} -.list-group-item.active, -.list-group-item.active:hover, -.list-group-item.active:focus { - z-index: 2; - color: #ffffff; - background-color: #428bca; - border-color: #428bca; -} -.list-group-item.active .list-group-item-heading, -.list-group-item.active:hover .list-group-item-heading, -.list-group-item.active:focus .list-group-item-heading { - color: inherit; -} -.list-group-item.active .list-group-item-text, -.list-group-item.active:hover .list-group-item-text, -.list-group-item.active:focus .list-group-item-text { - color: #e1edf7; -} -.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: #ffffff; - border: 1px solid transparent; - border-radius: 4px; - -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05); - box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05); -} -.panel-body { - padding: 15px; -} -.panel-body:before, -.panel-body:after { - content: " "; - /* 1 */ - - display: table; - /* 2 */ - -} -.panel-body:after { - clear: both; -} -.panel-body:before, -.panel-body:after { - content: " "; - /* 1 */ - - display: table; - /* 2 */ - -} -.panel-body:after { - clear: both; -} -.panel > .list-group { - margin-bottom: 0; -} -.panel > .list-group .list-group-item { - border-width: 1px 0; -} -.panel > .list-group .list-group-item:first-child { - border-top-right-radius: 0; - border-top-left-radius: 0; -} -.panel > .list-group .list-group-item:last-child { - border-bottom: 0; -} -.panel-heading + .list-group .list-group-item:first-child { - border-top-width: 0; -} -.panel > .table { - margin-bottom: 0; -} -.panel > .panel-body + .table { - border-top: 1px solid #dddddd; -} -.panel-heading { - padding: 10px 15px; - border-bottom: 1px solid transparent; - border-top-right-radius: 3px; - border-top-left-radius: 3px; -} -.panel-title { - margin-top: 0; - margin-bottom: 0; - font-size: 16px; -} -.panel-title > a { - color: inherit; -} -.panel-footer { - padding: 10px 15px; - background-color: #f5f5f5; - border-top: 1px solid #dddddd; - border-bottom-right-radius: 3px; - border-bottom-left-radius: 3px; -} -.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 #dddddd; -} -.panel-group .panel-footer { - border-top: 0; -} -.panel-group .panel-footer + .panel-collapse .panel-body { - border-bottom: 1px solid #dddddd; -} -.panel-default { - border-color: #dddddd; -} -.panel-default > .panel-heading { - color: #333333; - background-color: #f5f5f5; - border-color: #dddddd; -} -.panel-default > .panel-heading + .panel-collapse .panel-body { - border-top-color: #dddddd; -} -.panel-default > .panel-footer + .panel-collapse .panel-body { - border-bottom-color: #dddddd; -} -.panel-primary { - border-color: #428bca; -} -.panel-primary > .panel-heading { - color: #ffffff; - 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: #468847; - 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-warning { - border-color: #fbeed5; -} -.panel-warning > .panel-heading { - color: #c09853; - background-color: #fcf8e3; - border-color: #fbeed5; -} -.panel-warning > .panel-heading + .panel-collapse .panel-body { - border-top-color: #fbeed5; -} -.panel-warning > .panel-footer + .panel-collapse .panel-body { - border-bottom-color: #fbeed5; -} -.panel-danger { - border-color: #eed3d7; -} -.panel-danger > .panel-heading { - color: #b94a48; - background-color: #f2dede; - border-color: #eed3d7; -} -.panel-danger > .panel-heading + .panel-collapse .panel-body { - border-top-color: #eed3d7; -} -.panel-danger > .panel-footer + .panel-collapse .panel-body { - border-bottom-color: #eed3d7; -} -.panel-info { - border-color: #bce8f1; -} -.panel-info > .panel-heading { - color: #3a87ad; - 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; -} -.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, 0.05); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); -} -.well blockquote { - border-color: #ddd; - border-color: rgba(0, 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: bold; - line-height: 1; - color: #000000; - text-shadow: 0 1px 0 #ffffff; - opacity: 0.2; - filter: alpha(opacity=20); -} -.close:hover, -.close:focus { - color: #000000; - text-decoration: none; - cursor: pointer; - opacity: 0.5; - filter: alpha(opacity=50); -} -button.close { - padding: 0; - cursor: pointer; - background: transparent; - border: 0; - -webkit-appearance: none; -} -.modal-open { - overflow: hidden; -} -body.modal-open, -.modal-open .navbar-fixed-top, -.modal-open .navbar-fixed-bottom { - margin-right: 15px; -} -.modal { - display: none; - overflow: auto; - overflow-y: scroll; - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 1040; -} -.modal.fade .modal-dialog { - -webkit-transform: translate(0, -25%); - -ms-transform: translate(0, -25%); - transform: translate(0, -25%); - -webkit-transition: -webkit-transform 0.3s ease-out; - -moz-transition: -moz-transform 0.3s ease-out; - -o-transition: -o-transform 0.3s ease-out; - transition: transform 0.3s ease-out; -} -.modal.in .modal-dialog { - -webkit-transform: translate(0, 0); - -ms-transform: translate(0, 0); - transform: translate(0, 0); -} -.modal-dialog { - margin-left: auto; - margin-right: auto; - width: auto; - padding: 10px; - z-index: 1050; -} -.modal-content { - position: relative; - background-color: #ffffff; - border: 1px solid #999999; - border: 1px solid rgba(0, 0, 0, 0.2); - border-radius: 6px; - -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5); - box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5); - background-clip: padding-box; - outline: none; -} -.modal-backdrop { - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 1030; - background-color: #000000; -} -.modal-backdrop.fade { - opacity: 0; - filter: alpha(opacity=0); -} -.modal-backdrop.in { - opacity: 0.5; - filter: alpha(opacity=50); -} -.modal-header { - padding: 15px; - border-bottom: 1px solid #e5e5e5; - min-height: 16.428571429px; -} -.modal-header .close { - margin-top: -2px; -} -.modal-title { - margin: 0; - line-height: 1.428571429; -} -.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:before, -.modal-footer:after { - content: " "; - /* 1 */ - - display: table; - /* 2 */ - -} -.modal-footer:after { - clear: both; -} -.modal-footer:before, -.modal-footer:after { - content: " "; - /* 1 */ - - display: table; - /* 2 */ - -} -.modal-footer:after { - clear: both; -} -.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 screen and (min-width: 768px) { - .modal-dialog { - left: 50%; - right: auto; - width: 600px; - padding-top: 30px; - padding-bottom: 30px; - } - .modal-content { - -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); - box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); - } -} -.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: 0.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: #ffffff; - text-align: center; - text-decoration: none; - background-color: #000000; - 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: #000000; -} -.tooltip.top-left .tooltip-arrow { - bottom: 0; - left: 5px; - border-width: 5px 5px 0; - border-top-color: #000000; -} -.tooltip.top-right .tooltip-arrow { - bottom: 0; - right: 5px; - border-width: 5px 5px 0; - border-top-color: #000000; -} -.tooltip.right .tooltip-arrow { - top: 50%; - left: 0; - margin-top: -5px; - border-width: 5px 5px 5px 0; - border-right-color: #000000; -} -.tooltip.left .tooltip-arrow { - top: 50%; - right: 0; - margin-top: -5px; - border-width: 5px 0 5px 5px; - border-left-color: #000000; -} -.tooltip.bottom .tooltip-arrow { - top: 0; - left: 50%; - margin-left: -5px; - border-width: 0 5px 5px; - border-bottom-color: #000000; -} -.tooltip.bottom-left .tooltip-arrow { - top: 0; - left: 5px; - border-width: 0 5px 5px; - border-bottom-color: #000000; -} -.tooltip.bottom-right .tooltip-arrow { - top: 0; - right: 5px; - border-width: 0 5px 5px; - border-bottom-color: #000000; -} -.popover { - position: absolute; - top: 0; - left: 0; - z-index: 1010; - display: none; - max-width: 276px; - padding: 1px; - text-align: left; - background-color: #ffffff; - background-clip: padding-box; - border: 1px solid #cccccc; - border: 1px solid rgba(0, 0, 0, 0.2); - border-radius: 6px; - -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - box-shadow: 0 5px 10px rgba(0, 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: normal; - 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: #999999; - border-top-color: rgba(0, 0, 0, 0.25); - bottom: -11px; -} -.popover.top .arrow:after { - content: " "; - bottom: 1px; - margin-left: -10px; - border-bottom-width: 0; - border-top-color: #ffffff; -} -.popover.right .arrow { - top: 50%; - left: -11px; - margin-top: -11px; - border-left-width: 0; - border-right-color: #999999; - border-right-color: rgba(0, 0, 0, 0.25); -} -.popover.right .arrow:after { - content: " "; - left: 1px; - bottom: -10px; - border-left-width: 0; - border-right-color: #ffffff; -} -.popover.bottom .arrow { - left: 50%; - margin-left: -11px; - border-top-width: 0; - border-bottom-color: #999999; - border-bottom-color: rgba(0, 0, 0, 0.25); - top: -11px; -} -.popover.bottom .arrow:after { - content: " "; - top: 1px; - margin-left: -10px; - border-top-width: 0; - border-bottom-color: #ffffff; -} -.popover.left .arrow { - top: 50%; - right: -11px; - margin-top: -11px; - border-right-width: 0; - border-left-color: #999999; - border-left-color: rgba(0, 0, 0, 0.25); -} -.popover.left .arrow:after { - content: " "; - right: 1px; - border-right-width: 0; - border-left-color: #ffffff; - bottom: -10px; -} -.carousel { - position: relative; -} -.carousel-inner { - position: relative; - overflow: hidden; - width: 100%; -} -.carousel-inner > .item { - display: none; - position: relative; - -webkit-transition: 0.6s ease-in-out left; - transition: 0.6s ease-in-out left; -} -.carousel-inner > .item > img, -.carousel-inner > .item > a > img { - display: block; - max-width: 100%; - height: auto; - 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: 0.5; - filter: alpha(opacity=50); - font-size: 20px; - color: #ffffff; - text-align: center; - text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); -} -.carousel-control.left { - background-image: -webkit-gradient(linear, 0% top, 100% top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0.0001))); - background-image: -webkit-linear-gradient(left, color-stop(rgba(0, 0, 0, 0.5) 0%), color-stop(rgba(0, 0, 0, 0.0001) 100%)); - background-image: -moz-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%); - background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0%, rgba(0, 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-gradient(linear, 0% top, 100% top, from(rgba(0, 0, 0, 0.0001)), to(rgba(0, 0, 0, 0.5))); - background-image: -webkit-linear-gradient(left, color-stop(rgba(0, 0, 0, 0.0001) 0%), color-stop(rgba(0, 0, 0, 0.5) 100%)); - background-image: -moz-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%); - background-image: linear-gradient(to right, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 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 { - color: #ffffff; - text-decoration: none; - opacity: 0.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%; - left: 50%; - z-index: 5; - display: inline-block; -} -.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 #ffffff; - border-radius: 10px; - cursor: pointer; -} -.carousel-indicators .active { - margin: 0; - width: 12px; - height: 12px; - background-color: #ffffff; -} -.carousel-caption { - position: absolute; - left: 15%; - right: 15%; - bottom: 20px; - z-index: 10; - padding-top: 20px; - padding-bottom: 20px; - color: #ffffff; - text-align: center; - text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); -} -.carousel-caption .btn { - text-shadow: none; -} -@media screen and (min-width: 768px) { - .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 { - content: " "; - /* 1 */ - - display: table; - /* 2 */ - -} -.clearfix:after { - clear: both; -} -.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; -} -.affix { - position: fixed; -} -@-ms-viewport { - width: device-width; -} -@media screen and (max-width: 400px) { - @-ms-viewport { - width: 320px; - } -} -.hidden { - display: none !important; - visibility: hidden !important; -} -.visible-xs { - display: none !important; -} -tr.visible-xs { - display: none !important; -} -th.visible-xs, -td.visible-xs { - display: none !important; -} -@media (max-width: 767px) { - .visible-xs { - display: block !important; - } - 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-xs.visible-sm { - display: block !important; - } - tr.visible-xs.visible-sm { - display: table-row !important; - } - th.visible-xs.visible-sm, - td.visible-xs.visible-sm { - display: table-cell !important; - } -} -@media (min-width: 992px) and (max-width: 1199px) { - .visible-xs.visible-md { - display: block !important; - } - tr.visible-xs.visible-md { - display: table-row !important; - } - th.visible-xs.visible-md, - td.visible-xs.visible-md { - display: table-cell !important; - } -} -@media (min-width: 1200px) { - .visible-xs.visible-lg { - display: block !important; - } - tr.visible-xs.visible-lg { - display: table-row !important; - } - th.visible-xs.visible-lg, - td.visible-xs.visible-lg { - display: table-cell !important; - } -} -.visible-sm { - display: none !important; -} -tr.visible-sm { - display: none !important; -} -th.visible-sm, -td.visible-sm { - display: none !important; -} -@media (max-width: 767px) { - .visible-sm.visible-xs { - display: block !important; - } - tr.visible-sm.visible-xs { - display: table-row !important; - } - th.visible-sm.visible-xs, - td.visible-sm.visible-xs { - display: table-cell !important; - } -} -@media (min-width: 768px) and (max-width: 991px) { - .visible-sm { - display: block !important; - } - 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-sm.visible-md { - display: block !important; - } - tr.visible-sm.visible-md { - display: table-row !important; - } - th.visible-sm.visible-md, - td.visible-sm.visible-md { - display: table-cell !important; - } -} -@media (min-width: 1200px) { - .visible-sm.visible-lg { - display: block !important; - } - tr.visible-sm.visible-lg { - display: table-row !important; - } - th.visible-sm.visible-lg, - td.visible-sm.visible-lg { - display: table-cell !important; - } -} -.visible-md { - display: none !important; -} -tr.visible-md { - display: none !important; -} -th.visible-md, -td.visible-md { - display: none !important; -} -@media (max-width: 767px) { - .visible-md.visible-xs { - display: block !important; - } - tr.visible-md.visible-xs { - display: table-row !important; - } - th.visible-md.visible-xs, - td.visible-md.visible-xs { - display: table-cell !important; - } -} -@media (min-width: 768px) and (max-width: 991px) { - .visible-md.visible-sm { - display: block !important; - } - tr.visible-md.visible-sm { - display: table-row !important; - } - th.visible-md.visible-sm, - td.visible-md.visible-sm { - display: table-cell !important; - } -} -@media (min-width: 992px) and (max-width: 1199px) { - .visible-md { - display: block !important; - } - tr.visible-md { - display: table-row !important; - } - th.visible-md, - td.visible-md { - display: table-cell !important; - } -} -@media (min-width: 1200px) { - .visible-md.visible-lg { - display: block !important; - } - tr.visible-md.visible-lg { - display: table-row !important; - } - th.visible-md.visible-lg, - td.visible-md.visible-lg { - display: table-cell !important; - } -} -.visible-lg { - display: none !important; -} -tr.visible-lg { - display: none !important; -} -th.visible-lg, -td.visible-lg { - display: none !important; -} -@media (max-width: 767px) { - .visible-lg.visible-xs { - display: block !important; - } - tr.visible-lg.visible-xs { - display: table-row !important; - } - th.visible-lg.visible-xs, - td.visible-lg.visible-xs { - display: table-cell !important; - } -} -@media (min-width: 768px) and (max-width: 991px) { - .visible-lg.visible-sm { - display: block !important; - } - tr.visible-lg.visible-sm { - display: table-row !important; - } - th.visible-lg.visible-sm, - td.visible-lg.visible-sm { - display: table-cell !important; - } -} -@media (min-width: 992px) and (max-width: 1199px) { - .visible-lg.visible-md { - display: block !important; - } - tr.visible-lg.visible-md { - display: table-row !important; - } - th.visible-lg.visible-md, - td.visible-lg.visible-md { - display: table-cell !important; - } -} -@media (min-width: 1200px) { - .visible-lg { - display: block !important; - } - tr.visible-lg { - display: table-row !important; - } - th.visible-lg, - td.visible-lg { - display: table-cell !important; - } -} -.hidden-xs { - display: block !important; -} -tr.hidden-xs { - display: table-row !important; -} -th.hidden-xs, -td.hidden-xs { - display: table-cell !important; -} -@media (max-width: 767px) { - .hidden-xs { - display: none !important; - } - tr.hidden-xs { - display: none !important; - } - th.hidden-xs, - td.hidden-xs { - display: none !important; - } -} -@media (min-width: 768px) and (max-width: 991px) { - .hidden-xs.hidden-sm { - display: none !important; - } - tr.hidden-xs.hidden-sm { - display: none !important; - } - th.hidden-xs.hidden-sm, - td.hidden-xs.hidden-sm { - display: none !important; - } -} -@media (min-width: 992px) and (max-width: 1199px) { - .hidden-xs.hidden-md { - display: none !important; - } - tr.hidden-xs.hidden-md { - display: none !important; - } - th.hidden-xs.hidden-md, - td.hidden-xs.hidden-md { - display: none !important; - } -} -@media (min-width: 1200px) { - .hidden-xs.hidden-lg { - display: none !important; - } - tr.hidden-xs.hidden-lg { - display: none !important; - } - th.hidden-xs.hidden-lg, - td.hidden-xs.hidden-lg { - display: none !important; - } -} -.hidden-sm { - display: block !important; -} -tr.hidden-sm { - display: table-row !important; -} -th.hidden-sm, -td.hidden-sm { - display: table-cell !important; -} -@media (max-width: 767px) { - .hidden-sm.hidden-xs { - display: none !important; - } - tr.hidden-sm.hidden-xs { - display: none !important; - } - th.hidden-sm.hidden-xs, - td.hidden-sm.hidden-xs { - display: none !important; - } -} -@media (min-width: 768px) and (max-width: 991px) { - .hidden-sm { - display: none !important; - } - tr.hidden-sm { - display: none !important; - } - th.hidden-sm, - td.hidden-sm { - display: none !important; - } -} -@media (min-width: 992px) and (max-width: 1199px) { - .hidden-sm.hidden-md { - display: none !important; - } - tr.hidden-sm.hidden-md { - display: none !important; - } - th.hidden-sm.hidden-md, - td.hidden-sm.hidden-md { - display: none !important; - } -} -@media (min-width: 1200px) { - .hidden-sm.hidden-lg { - display: none !important; - } - tr.hidden-sm.hidden-lg { - display: none !important; - } - th.hidden-sm.hidden-lg, - td.hidden-sm.hidden-lg { - display: none !important; - } -} -.hidden-md { - display: block !important; -} -tr.hidden-md { - display: table-row !important; -} -th.hidden-md, -td.hidden-md { - display: table-cell !important; -} -@media (max-width: 767px) { - .hidden-md.hidden-xs { - display: none !important; - } - tr.hidden-md.hidden-xs { - display: none !important; - } - th.hidden-md.hidden-xs, - td.hidden-md.hidden-xs { - display: none !important; - } -} -@media (min-width: 768px) and (max-width: 991px) { - .hidden-md.hidden-sm { - display: none !important; - } - tr.hidden-md.hidden-sm { - display: none !important; - } - th.hidden-md.hidden-sm, - td.hidden-md.hidden-sm { - display: none !important; - } -} -@media (min-width: 992px) and (max-width: 1199px) { - .hidden-md { - display: none !important; - } - tr.hidden-md { - display: none !important; - } - th.hidden-md, - td.hidden-md { - display: none !important; - } -} -@media (min-width: 1200px) { - .hidden-md.hidden-lg { - display: none !important; - } - tr.hidden-md.hidden-lg { - display: none !important; - } - th.hidden-md.hidden-lg, - td.hidden-md.hidden-lg { - display: none !important; - } -} -.hidden-lg { - display: block !important; -} -tr.hidden-lg { - display: table-row !important; -} -th.hidden-lg, -td.hidden-lg { - display: table-cell !important; -} -@media (max-width: 767px) { - .hidden-lg.hidden-xs { - display: none !important; - } - tr.hidden-lg.hidden-xs { - display: none !important; - } - th.hidden-lg.hidden-xs, - td.hidden-lg.hidden-xs { - display: none !important; - } -} -@media (min-width: 768px) and (max-width: 991px) { - .hidden-lg.hidden-sm { - display: none !important; - } - tr.hidden-lg.hidden-sm { - display: none !important; - } - th.hidden-lg.hidden-sm, - td.hidden-lg.hidden-sm { - display: none !important; - } -} -@media (min-width: 992px) and (max-width: 1199px) { - .hidden-lg.hidden-md { - display: none !important; - } - tr.hidden-lg.hidden-md { - display: none !important; - } - th.hidden-lg.hidden-md, - td.hidden-lg.hidden-md { - display: none !important; - } -} -@media (min-width: 1200px) { - .hidden-lg { - display: none !important; - } - tr.hidden-lg { - display: none !important; - } - th.hidden-lg, - td.hidden-lg { - display: none !important; - } -} -.visible-print { - display: none !important; -} -tr.visible-print { - display: none !important; -} -th.visible-print, -td.visible-print { - display: none !important; -} -@media print { - .visible-print { - display: block !important; - } - tr.visible-print { - display: table-row !important; - } - th.visible-print, - td.visible-print { - display: table-cell !important; - } - .hidden-print { - display: none !important; - } - tr.hidden-print { - display: none !important; - } - th.hidden-print, - td.hidden-print { - display: none !important; - } -} diff --git a/docs/reference/themes/mongodb/static/css/fonts/MMSIcons-Regular.eot b/docs/reference/themes/mongodb/static/css/fonts/MMSIcons-Regular.eot deleted file mode 100755 index dba86b1fa0f..00000000000 Binary files a/docs/reference/themes/mongodb/static/css/fonts/MMSIcons-Regular.eot and /dev/null differ diff --git a/docs/reference/themes/mongodb/static/css/fonts/MMSIcons-Regular.svg b/docs/reference/themes/mongodb/static/css/fonts/MMSIcons-Regular.svg deleted file mode 100755 index 1f8e4750be3..00000000000 --- a/docs/reference/themes/mongodb/static/css/fonts/MMSIcons-Regular.svg +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/reference/themes/mongodb/static/css/fonts/MMSIcons-Regular.ttf b/docs/reference/themes/mongodb/static/css/fonts/MMSIcons-Regular.ttf deleted file mode 100755 index 61fb6eb12c6..00000000000 Binary files a/docs/reference/themes/mongodb/static/css/fonts/MMSIcons-Regular.ttf and /dev/null differ diff --git a/docs/reference/themes/mongodb/static/css/fonts/MMSIcons-Regular.woff b/docs/reference/themes/mongodb/static/css/fonts/MMSIcons-Regular.woff deleted file mode 100755 index 22c424e1b14..00000000000 Binary files a/docs/reference/themes/mongodb/static/css/fonts/MMSIcons-Regular.woff and /dev/null differ diff --git a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdita.eot b/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdita.eot deleted file mode 100755 index eecee6e3c7d..00000000000 Binary files a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdita.eot and /dev/null differ diff --git a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdita.svg b/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdita.svg deleted file mode 100755 index c165cd733ad..00000000000 --- a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdita.svg +++ /dev/null @@ -1,1862 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdita.ttf b/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdita.ttf deleted file mode 100755 index b72101ac6a2..00000000000 Binary files a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdita.ttf and /dev/null differ diff --git a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdita.woff b/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdita.woff deleted file mode 100755 index b28cc35e5cd..00000000000 Binary files a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdita.woff and /dev/null differ diff --git a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdlig.eot b/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdlig.eot deleted file mode 100755 index f75a344ab75..00000000000 Binary files a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdlig.eot and /dev/null differ diff --git a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdlig.svg b/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdlig.svg deleted file mode 100755 index 4c31ccf7e07..00000000000 --- a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdlig.svg +++ /dev/null @@ -1,1886 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdlig.ttf b/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdlig.ttf deleted file mode 100755 index 2bbe662fbd2..00000000000 Binary files a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdlig.ttf and /dev/null differ diff --git a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdlig.woff b/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdlig.woff deleted file mode 100755 index 933873fb169..00000000000 Binary files a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdlig.woff and /dev/null differ diff --git a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdligcnd.eot b/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdligcnd.eot deleted file mode 100755 index c4c96f1f469..00000000000 Binary files a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdligcnd.eot and /dev/null differ diff --git a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdligcnd.svg b/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdligcnd.svg deleted file mode 100755 index f71e5ae309a..00000000000 --- a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdligcnd.svg +++ /dev/null @@ -1,1754 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdligcnd.ttf b/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdligcnd.ttf deleted file mode 100755 index 1af00d14264..00000000000 Binary files a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdligcnd.ttf and /dev/null differ diff --git a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdligcnd.woff b/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdligcnd.woff deleted file mode 100755 index 1aef4ec4876..00000000000 Binary files a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdligcnd.woff and /dev/null differ diff --git a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdligita.eot b/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdligita.eot deleted file mode 100755 index 49e8b664354..00000000000 Binary files a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdligita.eot and /dev/null differ diff --git a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdligita.svg b/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdligita.svg deleted file mode 100755 index 9d95bca1f7a..00000000000 --- a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdligita.svg +++ /dev/null @@ -1,866 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdligita.ttf b/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdligita.ttf deleted file mode 100755 index 80336dd11cc..00000000000 Binary files a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdligita.ttf and /dev/null differ diff --git a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdligita.woff b/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdligita.woff deleted file mode 100755 index e7d79eca998..00000000000 Binary files a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdligita.woff and /dev/null differ diff --git a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdmed.eot b/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdmed.eot deleted file mode 100755 index c727162c25c..00000000000 Binary files a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdmed.eot and /dev/null differ diff --git a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdmed.svg b/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdmed.svg deleted file mode 100755 index 67189080f9b..00000000000 --- a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdmed.svg +++ /dev/null @@ -1,1681 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdmed.ttf b/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdmed.ttf deleted file mode 100755 index af7f804e718..00000000000 Binary files a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdmed.ttf and /dev/null differ diff --git a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdmed.woff b/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdmed.woff deleted file mode 100755 index 0d17b26fb86..00000000000 Binary files a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdmed.woff and /dev/null differ diff --git a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdmedita.eot b/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdmedita.eot deleted file mode 100755 index e119da3e49d..00000000000 Binary files a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdmedita.eot and /dev/null differ diff --git a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdmedita.svg b/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdmedita.svg deleted file mode 100755 index 28bc57b276b..00000000000 --- a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdmedita.svg +++ /dev/null @@ -1,1584 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdmedita.ttf b/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdmedita.ttf deleted file mode 100755 index 25c92b53aae..00000000000 Binary files a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdmedita.ttf and /dev/null differ diff --git a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdmedita.woff b/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdmedita.woff deleted file mode 100755 index beaa1204e00..00000000000 Binary files a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdmedita.woff and /dev/null differ diff --git a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdreg.eot b/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdreg.eot deleted file mode 100755 index 8a2af9f0f88..00000000000 Binary files a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdreg.eot and /dev/null differ diff --git a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdreg.svg b/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdreg.svg deleted file mode 100755 index 1b9fb47c21b..00000000000 --- a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdreg.svg +++ /dev/null @@ -1,1883 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdreg.ttf b/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdreg.ttf deleted file mode 100755 index 2dedc3e9ae5..00000000000 Binary files a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdreg.ttf and /dev/null differ diff --git a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdreg.woff b/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdreg.woff deleted file mode 100755 index 806ae7a49ed..00000000000 Binary files a/docs/reference/themes/mongodb/static/css/fonts/akzidgrostdreg.woff and /dev/null differ diff --git a/docs/reference/themes/mongodb/static/css/mongodb-docs.css b/docs/reference/themes/mongodb/static/css/mongodb-docs.css deleted file mode 100644 index 3944602b762..00000000000 --- a/docs/reference/themes/mongodb/static/css/mongodb-docs.css +++ /dev/null @@ -1,1520 +0,0 @@ -/* - * nature.css_t - * ~~~~~~~~~~~~ - * - * Sphinx stylesheet -- nature theme. - * - * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ -@import url("basic.css"); - -@import url(http://fonts.googleapis.com/css?family=Source+Code+Pro:300,500,700); - -* Fonts! */ -/*Reg*/ -@font-face { - font-family: 'Akzidenz'; - src: url('fonts/akzidgrostdreg.eot'); - src: url('fonts/akzidgrostdreg.eot#iefix') format('embedded-opentype'), - url('fonts/akzidgrostdreg.woff') format('woff'), - url('fonts/akzidgrostdreg.ttf') format('truetype'); - font-style: normal; - font-weight: normal; -} -/*Reg Italic*/ -@font-face { - font-family: 'Akzidenz'; - src: url('fonts/akzidgrostdita.eot'); - src: url('fonts/akzidgrostdita.eot#iefix') format('embedded-opentype'), - url('fonts/akzidgrostdita.woff') format('woff'), - url('fonts/akzidgrostdita.ttf') format('truetype'); - font-style: italic; - font-weight: normal; -} -/*Bold*/ -@font-face { - font-family: 'Akzidenz'; - src: url('fonts/akzidgrostdmed.eot'); - src: url('fonts/akzidgrostdmed.eot#iefix') format('embedded-opentype'), - url('fonts/akzidgrostdmed.woff') format('woff'), - url('fonts/akzidgrostdmed.ttf') format('truetype'); - font-style: normal; - font-weight: bold; -} -/*Bold Italic*/ -@font-face { - font-family: 'Akzidenz'; - src: url('fonts/akzidgrostdmedita.eot'); - src: url('fonts/akzidgrostdmedita.eot#iefix') format('embedded-opentype'), - url('fonts/akzidgrostdmedita.woff') format('woff'), - url('fonts/akzidgrostdmedita.ttf') format('truetype'); - font-style: italic; - font-weight: bold; -} -/*Light*/ -@font-face { - font-family: 'Akzidenz'; - src: url('fonts/akzidgrostdlig.eot'); - src: url('fonts/akzidgrostdlig.eot#iefix') format('embedded-opentype'), - url('fonts/akzidgrostdlig.woff') format('woff'), - url('fonts/akzidgrostdlig.ttf') format('truetype'); - font-style: normal; - font-weight: 200; -} -/*Light Italic*/ -@font-face { - font-family: 'Akzidenz'; - src: url('fonts/akzidgrostdligita.eot'); - src: url('fonts/akzidgrostdligita.eot#iefix') format('embedded-opentype'), - url('fonts/akzidgrostdligita.woff') format('woff'), - url('fonts/akzidgrostdligita.ttf') format('truetype'); - font-style: italic; - font-weight: 200; -} - -/* -- page layout ----------------------------------------------------------- */ - -#baselineOverlay { - display: none; - position: fixed; - top: 0; - left: 0; - right: 0; - bottom: 0; - width: 100%; - height: 100%; - z-index: 2000; - opacity: 0.5; - background: url(../img/24px-baseline-overlay.png) 0 0 repeat; -} - -body { - font-family: "Akzidenz", "Helvetica Neue", Helvetica, Arial, sans-serif; - margin: 0; - padding: 0; - color: #494747; - -webkit-font-smoothing: antialiased; -} - -hr { border: 1px solid #B1B4B6; } - -.content { - font-size: 16px; - line-height: 24px; -} - -div.body { - overflow-x: auto; -} - -div.related { - color: #fff; - background-color: #402817; - margin-bottom: 0.9em; - font-size:90%; -} - -div.related a { - color: #E2F3CC; -} - -div.related ul { - padding: 0 0 0; -} - -div.footer-nav div.related ul { - padding: 5px 10px 0; -} - -.figure img { - width: 100%; -} - - -p.searchtip { font-size: 93%; } - -/* -- body styles ----------------------------------------------------------- */ - -a { - color: #006cbc; - text-decoration: none; -} - -a:hover { - text-decoration: underline; -} - -div.body h1, div.body h2, div.body h3, div.body h4, div.body h5, div.body h6 { - font-family: "Akzidenz", "Helvetica Neue", Helvetica, Arial, sans-serif; - font-weight: normal; - line-height: 24px; - color: #313030; - margin: 0; - padding: 0; -} - -div.body h2, div.body h2, div.body h3, div.body h4, div.body h5, div.body h6 { - cursor: pointer; -} - -div.body h1 { - border-top: none; - font-size: 36px; - line-height: 48px; - padding: 0; -} -div.body h2 { - font-size: 24px; -} -div.body h3 { - font-size: 18px; - font-weight: bold; - margin-bottom: 0; -} - -div.body h4 { - font-size: 16px; - font-weight: bold; - margin-bottom: 0; -} -div.body h5 { - font-size: 16px; -} -div.body h6 { - font-size: 16px; - font-weight: 300; - } - -div.body h1 + p, div.body h2 + p, div.body h3 + p, div.body h4 + p, -div.body h1 + dl, div.body h2 + dl, div.body h3 + dl, div.body h4 + dl { - padding: 0; - text-indent:0; -} - -div.body h1 + ul, div.body h2 + ul, div.body h3 + ul, div.body h4 + ul, -div.section h1 + ul, div.section h2 + ul, div.section h3 + ul, div.section h4 + ul{ - padding-top:0; - margin-top: 0.3em; - text-indent:0; - margin-left: -1.5em !important; -} - -a.headerlink { - - color: #c60f0f; - font-size: 0.8em; - padding: 0 4px 0 4px; - text-decoration: none; - - -} - -a.headerlink:hover { - background-color: #c60f0f; - color: white; -} - -div.body li { - padding-top: .2em; -} -div.highlight{ background-color: white; } -dl.binary { display: none; } -div.topic { background-color: #eee; } - -table.docutils > div.admonition-example { - background-color:inherit; -} - -div.admonition-example pre { - background-color: #FBFBFB; -} - -div.seealso { - padding-bottom: 7px; -} - -pre { - padding: 24px 12px; - color: #222; - margin: 24px 0; -} - -tt { - color: #000; - font-family: 'Source Code Pro', monospace; -} - -code { - color: #000; - font-family: 'Source Code Pro', monospace; -} - -a>tt { - color: #006cbc; -} - -tt.xref, a tt { - font-weight: normal; -} - - -.viewcode-back { font-family: helvetica,arial,sans-serif; } - -div.viewcode-block:target { - background-color: #f4debf; - border-top: 1px solid #ac9; - border-bottom: 1px solid #ac9; -} - -/* -p.first, p.last { - margin-bottom: 0 !important; -} -*/ - -table.docutils td { padding: 1px 8px 1em 5px; } - -table.docutils.field-list ul.first.last.simple>li { padding-top: 1em; } -table.docutils.field-list ul.first.last.simple>li>p { padding-top: 1em; } - -div.highlight-javascript>div.highlight>pre>span.hll { background-color: transparent; } -div.highlight-javascript>div.highlight>pre>span.hll>span.nx { font-weight: bold; } - -table.footnote { - font-size: 0.95em; - line-height: 1.3em; -} - -div td pre { - border: none; - -webkit-box-shadow: none; - -moz-box-shadow: none; - margin: 0px; - padding-top: 0px; - padding-right: 8px; - background-color: transparent; -} - -table.docutils { - margin: 24px 0; - font-size: 14px; - line-height: 24px; -} - -table.docutils td { padding: 11px 5px 12px; } - -table.docutils > thead th.head { - padding: 0 5px 12px; -} - -table.docutils td, table.docutils th { - border-color: #ebebed; -} - -table.index-table td { - text-align: left; - border-bottom: none; - border-right: 1px solid #ebebed; - padding-left: 25px; - padding-right: 0px; - padding-bottom: 0px; - padding-top: 5px; -} - -table.index-table td:last-child { - border-right: 0; -} - -table.index-table tr.row-even td p { - line-height: 24px; - margin-bottom: 10px; -} - -table.index-table tr.row-odd td { - text-align: center; - border-bottom: none; - border-right: none; - padding-left: 15px; - padding-right: 15px; - max-height:5px; - padding-top: 0px; -} - -table.index-table { - margin: auto; - width: 98%; /* hack to prevent horizontal scrolling in index.html */ -} - -table.index-table > thead th.head { - text-align: left; - padding: 0 0 5px 24px; - border-bottom: none; -} - -div#mongodb ul { - list-style: none; - padding-left:0px; - padding-right:1em; -} -div#mongodb ul.simple { - list-style:circle; - margin-top: 0px; - padding-left:0px; -} - -div.related li.right { - float: right; - margin-right: 5px; - margin-top: 85px; -} - -#main-db { - padding-top: 2.5em; - padding-bottom: 2em; - background-image: url(../img/back-body.png); - background-repeat: repeat-x; -} - -div#top-right { - position: absolute; - top: -3px; - right: 10px; - *z-index: 10; -} - -div#top-right ul#header-menu-bar { - margin-top: 0; - padding-left: 20px; - height: 38px; - background-image: url(../img/trans-user-left.png); - background-repeat: no-repeat; -} - -div#top-right div.user-right { - float: right; - height: 38px; - min-width: 186px; - margin: 0; - padding: 0 20px 0 0; - font-size: 10pt; - background-image: url(../img/trans-user-right.png); - background-position: top right; - background-repeat: no-repeat; -} - -div#top-right div.user-right li.normal { - float: left; - padding: 8px 1em 0 0; - height: 38px; - background-image: url(../img/trans-user-back.png); - background-repeat: repeat-x; - list-style-type: none; - font-size: 10pt; - color: #c48c55; -} - -div#top-right div.user-right a, div#top-right div.user-right a:visited { - border-right: 1px solid #663f12; - padding-right: 1em; - color: #aa814d; - font-weight: normal; -} - -div#top-right div.user-right li.last, div#top-right div.user-right a.last, div#top-right div.user-right a.last:visited { - padding-right: 0; - border-right: none; -} - -.quick-search { - margin: 0; - padding: 0; -} - -#quick-search input { float: right; } - -.quick-search input { - border: none; - margin: 0; - padding: 0; -} - -input.blank-search, .quick-search .placeholded { - color: #666; -} - -input.blur { color: #666; } - -input[type="text"]:disabled { color: #333; } - -#quick-search-query { width: 13em; } - -input#quick-search-query { - -webkit-appearance:none; - background-color: transparent !important; - position: relative; - top: 7px; - width: 230px; - border: none; - font-size: 73%; - color: #dbcaaf; -} - -input#quick-search-query:active { border:none !important; } - -#quick-search .placeholded { color: #dbcaaf; } - -input.blur { color: #666; } - -input[type="text"]:disabled { color: #333; } - -#quick-search-query { width: 13em; } - -#home-nav { - padding: 0; - background-color: #f6f4cd; -} - -#home-nav a:active, #home-nav a:focus { outline: none; } - -div.split ul.home-nav { - margin: 0; - height: 62px; - padding: 15px 0 4px 0; - width: 980px; -} - -div.split ul.home-nav li { - float: left; - margin: 0; - padding: 0; - list-style-type: none; - list-style-image: none; -} - -ul.home-nav li.docs { width: 276px; } - -ul.home-nav li.docs a, ul.home-nav li.docs a:visited { - float: left; - background: url(http://www.mongodb.org/static/images/home_nav.png) -11px -63px; - width: 209px; - height: 54px; -} - -ul.home-nav li.docs a:hover { - float: left; - background: url(http://www.mongodb.org/static/images/home_nav.png) -11px 0; - width: 209px; - height: 54px; -} - -ul.home-nav li.try { width: 238px; } - -ul.home-nav li.try a, ul.home-nav li.try a:visited { - float: left; - background: url(http://www.mongodb.org/static/images/home_nav.png) -274px -63px; - width: 176px; - height: 54px; -} - -ul.home-nav li.try a:hover { - float: left; - background: url(http://www.mongodb.org/static/images/home_nav.png) -274px 0; - width: 176px; - height: 54px; -} - -ul.home-nav li.downloads { width: 245px; } - -ul.home-nav li.downloads a, ul.home-nav li.downloads a:visited { - float: left; - background: url(http://www.mongodb.org/static/images/home_nav.png) -497px -63px; - width: 185px; - height: 54px; -} - -ul.home-nav li.downloads a:hover { - float: left; - background: url(http://www.mongodb.org/static/images/home_nav.png) -497px 0; - width: 185px; - height: 54px; -} - -ul.home-nav li.drivers { - width: 192px; -} - -ul.home-nav li.drivers a, ul.home-nav li.drivers a:visited { - float: left; - background: url(http://www.mongodb.org/static/images/home_nav.png) right -63px no-repeat; - width: 194px; - height: 54px; -} - -ul.home-nav li.drivers a:hover { - float: left; - background: url(http://www.mongodb.org/static/images/home_nav.png) right 0 no-repeat; - width: 194px; - height: 54px; -} - -ul.home-nav li .hidden { visibility: hidden; } - -div#docs-header { width: 950px; } - -div#main-db.hidden { display: none; } - -tt,tt span.pre { - font-family: 'Source Code Pro', monospace; -} -tt.descname, -tt.descclassname { - font-size: 16px; - font-weight: 300; -} - -dl.method dt { - margin-bottom: 24px; -} - -dl.method > dt big { - font-family: 'Source Code Pro', monospace; - font-weight: 300; - font-size: 16px; -} - -dl.method > dt em { - font-family: 'Source Code Pro', monospace; - font-weight: 700; - font-style: normal; -} -div.section > h1 + dl.dbcommand > dt {display: none;} -div.section > h1 + dl.operator > dt {display: none;} -div.section > h1 + dl.method > dt {display: none;} -div.section > h1 + dl.pipeline > dt {display: none;} -div.section > h1 + dl.group > dt {display: none;} -div.section > h1 + dl.expression > dt {display: none;} -div.section > h1 + dl.projection > dt {display: none;} - -.body p { - margin: 24px 0; -} - -.body p.caption { - margin-top: 0; -} - -.body li>p { - margin: 0; -} - -div.highlight pre { - background: #f5f6f7 url(../img/code-block-bg.png) 0 0 repeat; - border-radius: 0; - border: none; - border-left: 5px solid #494747; - font-family: 'Source Code Pro', monospace; - font-size: 14px; - line-height: 24px; - overflow: auto; - word-wrap: normal; - white-space: pre; -} - -@media (-webkit-min-device-pixel-ratio: 2), -(min-resolution: 192dpi) { - div.highlight pre { - background: #f5f6f7 url(../img/code-block-bg@2x.png) 0 0 repeat; - background-size: 12px 12px; - } -} - -table.docutils td div.highlight pre { - background: none; - border: none; - padding: 0; -} - -div.section { - margin-top: 48px; -} - -h2 + div.section, -h3 + div.section, -h4 + div.section { - margin-top: 0; -} - -div.section > h2, div.section > h3, div.section > h4 { - margin: 24px 0; -} - -div.section > h3, -div.section > h4 { - margin-bottom: 0; -} - -.body h3 + p, -.body h4 + p { - margin-top: 0; -} - -#btnv { - padding-top: 2em; - padding-bottom: 2.5em; - display: table; - width: 100%; -} - -#btnv .btn-prev-text, -#btnv .btn-next-text, -#btnv .btn-arrow-left, -#btnv .btn-arrow-right { - display: table-cell; - vertical-align: middle; -} - -#btnv .btn-arrow-left, -#btnv .btn-next-text { - text-align: right; -} - -#btnv .btn-arrow-right, -#btnv .btn-prev-text { - text-align: left; -} - -#btnv .btn-prev-text>span, #btnv .btn-next-text>span { - display: inline-block; - width: 270px; -} - -table.docutils tbody tr td div.highlight pre { background-color: inherit; } - -/* somehow, powershell commands starting with a directory reference does not include a div.highlight */ - -div.highlight-powershell pre { background-color: #F5F5F5; } - -div.body li > p.first { margin-bottom: 0; } -h4#vnd {padding:0;margin:0;line-height:1.5;padding-left:10px;} -div.body div.bc { - background: white; - cursor: default; - margin-bottom: 24px; -} -div.body div.bc .fa-home { - font-size: 24px; - margin-top: 2px; -} -div.body div.bc li.jr { float: right; display:none; } -div.body div.bc ul { padding:0; margin:0 } -div.body div.bc ul li { list-style: none; font-size: 13px; display:inline; } -div.body div.bc ul li a { color: #006cbc; } -div.dc span.bcpoint { font-weight: bold; font-size:0.9em; color: #343434; } -div.body div.contents { max-width: 30%; float: right; padding: 0 0.5em 0.5em; margin-left: 1em; } -div.body div.contents.long-toc { max-width: 100%; float: none; margin-left: 0; } -div.body div.contents li { padding-top: .25em; } -div.body div.contents ul { margin: 0; padding-left: 1.5em; } -div.hidden { display: none; } - -#vn { - font-size: 0.85em; -} - -.document .body .edit-link, -.document .body .edit-link:hover { - position: relative; - float: right; - bottom: -9px; - text-decoration: none; - font-size: 24px; - color: #313030; -} - -a > em { font-style: normal; } - -div.versionadded > p > span, div.versionchanged > p > span, div.deprecated > p > span { - font-style: italic; -} - -/* Content */ -.content { - box-sizing: border-box; - width: 1092px; -} - -.content .main-column { - margin-top: 72px; - margin-left: 293px; - min-height: 600px; - width: 800px; - padding: 0 30px; - - transition: margin-left 0.4s cubic-bezier(.02,.01,.47,1); - -moz-transition: margin-left 0.4s cubic-bezier(.02,.01,.47,1); - -webkit-transition: margin-left 0.4s cubic-bezier(.02,.01,.47,1); -} - -#see-also > p { - margin-top: 12.5px; -} - - -/* Header styles */ - -#header-db { - position: fixed; - -webkit-transform: translateZ(0); /* hack around Chrome bug: http://stackoverflow.com/questions/11258877/fixed-element-disappears-in-chrome */ - height: 50px; - top: 0; - left: 0; - width: 100%; - font-size: 31px; - background-color: #3b291f; - color: white; - margin: 0; - padding: 0; - z-index: 100; -} - -#header-db .header-content { - width: 1385px; - padding-left: 12px; - - transition: width 0.4s cubic-bezier(.02,.01,.47,1); - -moz-transition: width 0.4s cubic-bezier(.02,.01,.47,1); - -webkit-transition: width 0.4s cubic-bezier(.02,.01,.47,1); -} - -#header-db .nav-items { - display: inline-block; -} - -#header-db .nav-items > a { - font-size: 14px; -} - -#header-db a { - color: white; -} - -#header-db .logo img { - height: 36px; - vertical-align: top; -} -#header-db .nav-items > a:not(:last-child) { - margin-right: 15px; -} - -div.gsc-control-cse-en, div.gsc-control-cse { padding: 0 !important; } - -form.gsc-search-box { - background-color: rgba(255,255,255,0.3); - border-radius: 6px; - border: 1px solid #3b2920; -} - -.gsc-search-box.gsc-search-box-tools .gsc-search-box .gsc-input { - padding: 0; -} - -div.gsc-input-box, -.gsc-search-box .gsc-input>input:hover, .gsc-input-box-hover, -.gsc-search-box .gsc-input>input:focus, .gsc-input-box-focus { - border: 0; - background: transparent; - box-shadow: none; -} - -/* [name] selector is a hack to override google's stylsheet */ -.gsc-input input.gsc-input[name="search"] { - background-color: transparent !important; - color: white; - font-weight: 300; - font-size: 15px; - height: 1.3em !important; -} - -.gsc-input input.gsc-input::-webkit-input-placeholder, -.gsc-input input.gsc-input:-moz-input-placeholder, -.gsc-input input.gsc-input::-moz-input-placeholder, -.gsc-input input.gsc-input:-ms-input-placeholder { - color: #CCC; -} - -/* Clear search button */ -.gsib_b { - display: none; -} - -/* [title] selector is a hack to override google's stylesheet */ -input.gsc-search-button[title], input.gsc-search-button:hover[title], input.gsc-search-button:focus[title] { - border-color: transparent; - background-color: transparent; - padding: 0 8px; - box-sizing: content-box; - -moz-box-sizing: content-box; - -webkit-box-sizing: content-box; -} - -#header-db .logo { - padding: 5px 0; -} - -#header-db .search-db { - transition: width 0.3s linear; - -webkit-transition: width 0.3s linear; - -moz-transition: width 0.3s linear; - -o-transition: width 0.3s linear; - margin-left: 45px; - margin-top: 11px; - display: inline-block; -} - -#header-db .search-db.narrow { - width: 98px; -} - -#header-db .search-db.wide { - width: 226px; -} - -/* Footer styles */ -.footer { - width:auto; - font-size:80%; - border:none; - padding: 20px 0; -} - -.footer .copyright { - text-align: center; -} - -.footer p { - margin: 1em 0; - padding: 0; - line-height:1.5; -} - -.footer a { - color: #989898; - text-decoration: underline; -} - -.footer h3 { - margin-top: 10px; - font-size: 16px; -} - -.footer .box { - background-color: #f5f6f7; - min-height: 20px; - padding: 15px; - margin-bottom: 20px; - text-align: left; -} - -.footer .box a { - color: #333; - text-decoration: none; -} - -.footer .box a:hover { - text-decoration: underline; -} - -.footer ul { - list-style-type: none; - padding-left: 20px; -} - -.footer .section-0 { - padding-left: 100px; -} - -.footer .section-1 { - padding-left: 46px; -} - -.footer .section-2 { - padding-left: 64px; -} - -.footer .section-3 { - padding-left: 49px; -} - -@media (max-width: 992px) { - .footer .section-0, - .footer .section-1, - .footer .section-2, - .footer .section-3 { - padding-left: 15px; - } -} - -.social { - height: 21px; - position: absolute; - right: 0; - bottom: 43px; -} - -.right-column .wrapper { - min-height: 100%; - position: relative; - padding-bottom: 100px; -} - -.right-column .social .img { - background-repeat: no-repeat; - background-size: 21px 21px; - width: 21px; - height: 21px; - display: inline-block; -} - -.right-column .social .twitter-icon .img { - background-image: url(../img/social-twitter.png); -} - -.right-column .social .youtube-icon .img { - background-image: url(../img/social-youtube.png); -} - -.right-column .social .facebook-icon .img { - background-image: url(../img/social-facebook.png); -} - -.right-column .social .gplus-icon .img { - background-image: url(../img/social-gplus.png); -} - -@media only screen and (-webkit-min-device-pixel-ratio: 2) { - .right-column .social .twitter-icon .img { - background-image: url(../img/social-twitter@2x.png); - } - - .right-column .social .youtube-icon .img { - background-image: url(../img/social-youtube@2x.png); - } - - .right-column .social .facebook-icon .img { - background-image: url(../img/social-facebook@2x.png); - } - - .right-column .social .gplus-icon .img { - background-image: url(../img/social-gplus@2x.png); - } -} - -/* Numbered steps directive */ -.sequence-block { - display: table; - width: 100%; - table-layout: fixed; - margin: 25px 0; -} - -.sequence-block > .bullet-block { - display: table-cell; - padding-right: 10px; - width: 2.5em; -} - -.sequence-block .sequence-step { - text-align: center; - background-color: #333; - color: white; - width: 24px; - font-weight: bold; - height: 24px; - border-radius: 12px; -} - -.sequence-block > .section { - display: table-cell; -} - -.sequence-block > .section > h4 { - margin: 0; -} - -/* Collapsible sidebar styles */ -.sidebar { - position: fixed; - -webkit-transform: translateZ(0); /* hack around Chrome bug: http://stackoverflow.com/questions/11258877/fixed-element-disappears-in-chrome */ - background-color: #f5f6f7; - width: 293px; - height: auto; - top: 50px; - bottom: 0; - left: 0; - overflow: auto; - font-size: 0.85em; - z-index: 100; - - transition: left 0.4s cubic-bezier(.02,.01,.47,1); - -moz-transition: left 0.4s cubic-bezier(.02,.01,.47,1); - -webkit-transition: left 0.4s cubic-bezier(.02,.01,.47,1); -} - -div.ssidebar { - font-size: 14px; - height: 100%; -} - -div.ssidebarwrapper { - padding: 0; /* overwrites basic.css rules */ - padding-top: 24px; - padding-bottom: 130px; /* Extra padding for the footer items at the bottom */ - min-height: 100%; - position: relative; -} - -div.ssidebar h3 { - padding: 0 12px; - font-size: 14px; - line-height: 24px; - font-weight: bold; - margin: -3px 0 15px 0; -} - -div.ssidebar h3 a.index-link { - text-transform: uppercase; -} - -div.ssidebar h3 a.showlink { - color: #003594; -} - -.ssidebarwrapper > ul > .toctree-l1 { - padding: 11px 0; - line-height: 24px; - - border-top: 1px solid #ebebed; -} - -.ssidebarwrapper > ul > .toctree-l1.current { - background-color: #fff; - border-right: 1px solid #f5f6f7; -} - -.ssidebarwrapper li.toctree-l1 ul > li > a { - line-height: 24px; - display: inline-block; - width: 100%; -} - -.ssidebarwrapper > ul > .toctree-l1:last-child { - border-bottom: 1px solid #ebebed; -} - -.ssidebarwrapper .toctree-l1 li.current.selected-item { - background-color: rgb( 110, 124, 159 ); -} -.ssidebarwrapper .toctree-l1 li.current.selected-item > a, -.ssidebarwrapper .toctree-l1 li.current.selected-item > a > tt { - color: white; -} - -.ssidebarwrapper .toctree-l1 li.current.selected-item > ul { - background-color: white; - color: #333; -} - -.ssidebarwrapper > ul > .toctree-l1 > a { - font-size: 18px; - line-height: 24px; - padding: 0 12px; - width: 100%; - display: inline-block; -} - -.ssidebarwrapper .mms-hosted-search { - margin-top: 15px; -} - -.ssidebarwrapper .nav-footer { - padding: 50px 12px 12px 12px; - position: absolute; - bottom: 48px; -} - -div.ssidebar li.toctree-l2 > a { - text-indent: -12px; - padding-left: 37px; -} -div.ssidebar li.toctree-l3 > a { - text-indent: -12px; - padding-left: 48px; -} -div.ssidebar li.toctree-l4 > a { - text-indent: -12px; - padding-left: 60px; -} -div.ssidebar li.toctree-l5 > a { - text-indent: -12px; - padding-left: 72px; -} - -div.ssidebar p { - color: #333; - margin: 12px 0 5px 12px; - padding: 0 12px; -} - -div.ssidebar form { margin-top: 5px; } - -div.ssidebar p.logo { - color: #888; - padding: 0px; - margin: -18px 5px 5px; -} - -div.ssidebar ul ul, -div.ssidebar ul.want-points { - list-style: none outside none; - margin-left: 0; -} - -div.ssidebar ul { - margin: 10px; - padding: 0; - color: #000; -} - -div.ssidebar ul.extra-contents { - margin-top: -1px; -} - -div.ssidebar a { color: #333; } - -div.ssidebar input { - border: 1px solid #ccc; - font-family: sans-serif; - font-size: 1em; -} -div.ssidebar input[type=text]{ - margin-left: 20px; - width: 11em !important; -} -div.ssidebar input[type="submit"] { - text-align: center; - width: 4.5em !important; -} - -div.ssidebar tt.literal .pre { - font-weight: normal; -} - -div.ssidebarwrapper ul { - margin: 12px 0 0 0; - padding: 0; -} -div.ssidebarwrapper ul li a tt span { - font-size:inherit; -} -div.ssidebarwrapper div.idxcontents { - margin-left: 8px; - font-size: 88%; -} - -/* Options panel */ -.option-popup { - position: fixed; - -webkit-transform: translateZ(0); /* hack around Chrome bug: http://stackoverflow.com/questions/11258877/fixed-element-disappears-in-chrome */ - width: 293px; - height: 303px; - bottom: 0; - left: 0; - box-shadow: 0 -2px 3px rgba(0,0,0,0.15); - z-index: 100; - - transition: bottom 300ms cubic-bezier(.02,.01,.47,1); - -moz-transition: bottom 300ms cubic-bezier(.02,.01,.47,1); - -webkit-transition: bottom 300ms cubic-bezier(.02,.01,.47,1); -} - -.option-popup.closed { - bottom: -255px; -} - -.option-popup .option-header { - cursor: pointer; - height: 50px; - background-color: rgb(49, 48, 48); - color: rgb(160, 159, 158); - padding: 15px 14px; - font-size: 15px; - font-weight: bold; -} - -.option-popup .option-header > .fa-gear { - font-size: 18px; - margin-right: 10px; -} - -.option-popup .option-header > .fa-angle-up, -.option-popup .option-header > .fa-angle-down { - font-size: 18px; -} - -.option-popup .option-body { - height: 253px; - padding: 22px 16px; - background-color: rgb(73, 71, 71); - color: rgb(191, 191, 190); - font-size: 13px; -} - -.option-popup .option-body > ul { - padding: 0; -} - -.option-popup > .option-body > ul > li { - list-style-type: none; - padding-bottom: 20px; -} - -.option-popup .formats-list, -.option-popup .contribute-list { - margin: 0; - padding: 0; -} - -.option-popup .formats-list li, -.option-popup .contribute-list li { - display: inline; - margin-right: 30px; -} - -.option-body > ul > li > label { - color: rgb( 191, 191, 190 ); - line-height: 1.714; - font-weight: normal; -} - -.option-popup .formats-list > li > a, -.option-popup .contribute-list > li > a { - color: rgb( 255, 255, 255 ); - font-weight: bold; - line-height: 0.914; -} - -/* Right column TOC */ - -.content .right-column { - width: 292px; - padding: 0; - position: fixed; - -webkit-transform: translateZ(0); /* hack around Chrome bug: http://stackoverflow.com/questions/11258877/fixed-element-disappears-in-chrome */ - left: 1093px; - top: 72px; - bottom: 0; - overflow-y: auto; - overflow-x: hidden; -} - -.right-column .toc { - padding: 24px 20px; - background-color: rgb( 245, 246, 247 ); - margin-bottom: 24px; -} - -.right-column .toc .toc-header{ - font-size: 14px; - font-weight: bold; -} - -.right-column .toc a { - font-size: 13px; - text-indent: -11px; -} - -/*hack for correct line height*/ -.right-column .toc li { - line-height: 23px; -} -.right-column .toc li a { - line-height: 24px; -} -/*end hack*/ - -.right-column .toc li { - list-style: none; -} - -.right-column .toc ul { - padding: 0; - margin: 0; -} - -.right-column .toc > ul > li > a { - display: none; -} - -/* hack to hide toc items that are more than 2 levels deep */ -.right-column .toc > ul > li > ul > li > ul > li > ul { - display: none; -} - -.right-column .toc > ul > li > ul { - padding-left: 1px; -} - -.right-column .toc > ul > li > ul > li > ul { - padding-left: 13px; -} - -.right-column .toc li > a:before { - content: '\2022'; - color: #333; - opacity: 0.5; - display: inline-block; -} - -/* Admonition styles */ -div.admonition { - margin: 24px 0; - width: auto; - max-width: 100%; - padding: 2px 12px 22px 12px; - border-left: 5px solid transparent; -} - -.admonition .admonition-title { - margin-bottom: 0; - font-size: 12px; - font-weight: bold; - text-transform: uppercase; - line-height: 24px; -} - -.admonition .admonition-title:after { - content: ":"; - font-weight:900; -} - -.admonition > p { - margin: 0 0 12.5px 0; -} - -.admonition > p.last { - margin-bottom: 0; -} - -.admonition.admonition-platform-support, -.admonition.tip, -.admonition.admonition-tip, -.admonition.note { - background-color: #edf4e8; - border-color: #6ba442; -} - -.admonition.admonition-platform-support .admonition-title, -.admonition.tip .admonition-title, -.admonition.note .admonition-title { - color: #89b668; -} - -.admonition.important { - background-color: #fff2d5; - border-color: #ffb618; -} -.admonition.important .admonition-title { - color: #ffb618; -} - -/*.admonition.tip, .admonition-tip { - background-color: #a6c88e; - border-color: #507b32; -}*/ - -.admonition.admonition-optional { - background-color: inherit; - border: 1px solid #DCDCDC; -} - -.admonition.admonition-example { - background-color: #F5F5F5; - color: #000000; -} - -.admonition.warning { - background-color: #fae6e5; - border-color: #ed271c; -} - -.admonition.warning .admonition-title { - color: #ed271c; -} - -div.admonition pre { - margin: 10px 0; -} - -dd > div.admonition { - margin-left: 0; -} - -p > div.admonition { - margin-left:0; -} - -li > div.admonition { - margin-left:0; -} - -div.admonition.note table.docutils tr:last-child td { - border-bottom: 0; -} - -@media (max-width: 1393px) { - #header-db .header-content { - width: 1068px; - } - - .content .right-column { - display: none; - } -} - -.expand-toc-icon { - display: none; -} - -@media (max-width: 1093px) { - .expand-toc-icon { - display: block; - padding-top: 10px; - padding-right: 10px; - color: white; - } - - .expand-toc-icon:hover, - .expand-toc-icon:active { - color: white; - text-decoration: none; - } - - #header-db .header-content { - width: 775px; - padding-left: 25px; - } - - .sidebar { - left: -293px; - box-shadow: 0 0 13px rgba(0,0,0,0.3); - } - - .sidebar.reveal { - left: 0; - } - - .content .main-column { - margin-left: 0; - } -} diff --git a/docs/reference/themes/mongodb/static/css/overrides.css b/docs/reference/themes/mongodb/static/css/overrides.css deleted file mode 100644 index 75387e6fd23..00000000000 --- a/docs/reference/themes/mongodb/static/css/overrides.css +++ /dev/null @@ -1,158 +0,0 @@ -.toggle-nav .fa { - cursor: pointer; - display: inline-block; - font-size: 20px; -} - -.logo { - margin-left: 10px; -} - -.sidebar-menu .fa { - margin: auto 10px; -} - -.sidebar-closed .content .main-column { - margin-left: 5px; -} - -.jsEnabled pre { padding: 0px; overflow: auto; word-wrap: normal; white-space: nowrap;} -.jsEnabled pre code { padding: 24px 12px; overflow: auto; white-space: pre; - background: url(https://media.mongodb.org/code-block-bg.png) #f5f6f7;} - -.body blockquote { - background-color: #edf4e8; - border-color: #6ba442; -} -.body blockquote strong { - margin-bottom: 0; - font-size: 12px; - font-weight: bold; - text-transform: uppercase; - line-height: 24px; - background-color: #edf4e8; - border-color: #6ba442; -} -.body blockquote p { margin: 0px; } - - -.sidebar-menu li.toctree-l1 > ul { - display: none; -} -.sidebar-menu li.toctree-l1 > ul.current { - display: block; -} - -.sidebar-menu ul ul { - margin: 0; -} - -.right-column .toc { - display: none; - padding: 12px 20px; -} -.right-column .toc .toc-header { - font-size: 12px; - font-weight: bold; - text-transform: uppercase; - padding-bottom: 10px; -} -.right-column .toc #TableOfContents li > ul { - padding-left: 5px; -} - -.body div.admonition { - padding: 2px 12px 12px 12px; -} - -.body div.admonition h5 { - font-weight: 800; - text-transform: uppercase; -} - -a code { - color: #006cbc; -} - -code { - background-color: #f5f6f7; - color: #494747; -} - -a code { - color: #006cbc; -} - -#search { - visibility: hidden; - display: inline-block; - background-color: rgba(255,255,255,0.3); - border-radius: 6px; - border: 1px solid #3b2920; - font-weight: 300; - font-size: 15px; - padding: 2px; -} - -#search label { - padding-right: 5px; -} - -#search input[name="searchQuery"] { - background-color: transparent !important; - color: white; - border: none; - padding: 2px 0 0 4px; - outline: none; -} - -.jsEnabled #search { - visibility: visible; -} - - -@media (min-width: 815px) { - .nav-items a { - display: inline-block !important; - } - .nav-items { padding-right: 5px; } -} - -#header-db .nav-items > a { - display: none; -} - -@media (max-width: 1093px) { - #header-db .header-content { - width: auto; - padding-left: 25px; - } -} - -@media (max-width: 1393px) { - #header-db .header-content { - width: auto; - } -} - -.sidebar-closed #sidebar { - margin-left: -270px; -} - -.sidebar-closed-winSize #optionsVersionsPopup { - visibility: hidden; - left: -293px; -} - - -.sidebar-closed #optionsVersionsPopup { - left: -293px; -} - -#optionsVersionsPopup { - left: 0px; - -webkit-transform: translateZ(0); - transition: left 0.4s cubic-bezier(.02,.01,.47,1); - -moz-transition: left 0.4s cubic-bezier(.02,.01,.47,1); - -webkit-transition: left 0.4s cubic-bezier(.02,.01,.47,1); -} diff --git a/docs/reference/themes/mongodb/static/css/reset.css b/docs/reference/themes/mongodb/static/css/reset.css deleted file mode 100644 index 78d0b6e37c5..00000000000 --- a/docs/reference/themes/mongodb/static/css/reset.css +++ /dev/null @@ -1,46 +0,0 @@ -/* http://meyerweb.com/eric/tools/css/reset/ - v2.0 | 20110126 - License: none (public domain) -*/ - -html, body, div, span, applet, object, iframe, -h1, h2, h3, h4, h5, h6, p, blockquote, pre, -a, abbr, acronym, address, big, cite, code, -del, dfn, em, img, ins, kbd, q, s, samp, -small, strike, strong, sub, sup, tt, var, -b, u, i, center, -dl, dt, dd, ol, ul, li, -fieldset, form, label, legend, -table, caption, tbody, tfoot, thead, tr, th, td, -article, aside, canvas, details, embed, -figure, figcaption, footer, header, hgroup, -menu, nav, output, ruby, section, summary, -time, mark, audio, video { - font-size: 100%; - font: inherit; - vertical-align: baseline; -} -/* HTML5 display-role reset for older browsers */ -article, aside, details, figcaption, figure, -footer, header, hgroup, menu, nav, section { - display: block; -} -body { - line-height: 1; -} -ol, ul { - list-style: none; -} -blockquote, q { - quotes: none; -} -blockquote:before, blockquote:after, -q:before, q:after { - content: ''; - content: none; -} -table { - border-collapse: collapse; - border-spacing: 0; -} - diff --git a/docs/reference/themes/mongodb/static/favicon.ico b/docs/reference/themes/mongodb/static/favicon.ico deleted file mode 100644 index 1cb9531f4b7..00000000000 Binary files a/docs/reference/themes/mongodb/static/favicon.ico and /dev/null differ diff --git a/docs/reference/themes/mongodb/static/js/doctools.js b/docs/reference/themes/mongodb/static/js/doctools.js deleted file mode 100644 index 8d7a5fcb5d5..00000000000 --- a/docs/reference/themes/mongodb/static/js/doctools.js +++ /dev/null @@ -1,224 +0,0 @@ -/* - * doctools.js - * ~~~~~~~~~~~ - * - * Sphinx JavaScript utilities for all documentation. - * - * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -/** - * select a different prefix for underscore - */ -$u = _.noConflict(); - -/** - * make the code below compatible with browsers without - * an installed firebug like debugger -if (!window.console || !console.firebug) { - var names = ["log", "debug", "info", "warn", "error", "assert", "dir", - "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", - "profile", "profileEnd"]; - window.console = {}; - for (var i = 0; i < names.length; ++i) - window.console[names[i]] = function() {}; -} - */ - -/** - * small helper function to urldecode strings - */ -jQuery.urldecode = function(x) { - return decodeURIComponent(x).replace(/\+/g, ' '); -} - -/** - * small helper function to urlencode strings - */ -jQuery.urlencode = encodeURIComponent; - -/** - * This function returns the parsed url parameters of the - * current request. Multiple values per key are supported, - * it will always return arrays of strings for the value parts. - */ -jQuery.getQueryParameters = function(s) { - if (typeof s == 'undefined') - s = document.location.search; - var parts = s.substr(s.indexOf('?') + 1).split('&'); - var result = {}; - for (var i = 0; i < parts.length; i++) { - var tmp = parts[i].split('=', 2); - var key = jQuery.urldecode(tmp[0]); - var value = jQuery.urldecode(tmp[1]); - if (key in result) - result[key].push(value); - else - result[key] = [value]; - } - return result; -}; - -/** - * highlight a given string on a jquery object by wrapping it in - * span elements with the given class name. - */ -jQuery.fn.highlightText = function(text, className) { - function highlight(node) { - if (node.nodeType == 3) { - var val = node.nodeValue; - var pos = val.toLowerCase().indexOf(text); - if (pos >= 0 && !jQuery(node.parentNode).hasClass(className)) { - var span = document.createElement("span"); - span.className = className; - span.appendChild(document.createTextNode(val.substr(pos, text.length))); - node.parentNode.insertBefore(span, node.parentNode.insertBefore( - document.createTextNode(val.substr(pos + text.length)), - node.nextSibling)); - node.nodeValue = val.substr(0, pos); - } - } - else if (!jQuery(node).is("button, select, textarea")) { - jQuery.each(node.childNodes, function() { - highlight(this); - }); - } - } - return this.each(function() { - highlight(this); - }); -}; - -/** - * Small JavaScript module for the documentation. - */ -var Documentation = { - - init : function() { - this.highlightSearchWords(); - this.initIndexTable(); - }, - - /** - * i18n support - */ - TRANSLATIONS : {}, - PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; }, - LOCALE : 'unknown', - - // gettext and ngettext don't access this so that the functions - // can safely bound to a different name (_ = Documentation.gettext) - gettext : function(string) { - var translated = Documentation.TRANSLATIONS[string]; - if (typeof translated == 'undefined') - return string; - return (typeof translated == 'string') ? translated : translated[0]; - }, - - ngettext : function(singular, plural, n) { - var translated = Documentation.TRANSLATIONS[singular]; - if (typeof translated == 'undefined') - return (n == 1) ? singular : plural; - return translated[Documentation.PLURALEXPR(n)]; - }, - - addTranslations : function(catalog) { - for (var key in catalog.messages) - this.TRANSLATIONS[key] = catalog.messages[key]; - this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); - this.LOCALE = catalog.locale; - }, - - /** - * add context elements like header anchor links - */ - addContextElements : function() { - $('div[id] > :header:first').each(function() { - $('\u00B6'). - attr('href', '#' + this.id). - attr('title', _('Permalink to this headline')). - appendTo(this); - }); - $('dt[id]').each(function() { - $('\u00B6'). - attr('href', '#' + this.id). - attr('title', _('Permalink to this definition')). - appendTo(this); - }); - }, - - /** - * highlight the search words provided in the url in the text - */ - highlightSearchWords : function() { - var params = $.getQueryParameters(); - var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; - if (terms.length) { - var body = $('div.body'); - window.setTimeout(function() { - $.each(terms, function() { - body.highlightText(this.toLowerCase(), 'highlighted'); - }); - }, 10); - $('') - .appendTo($('#searchbox')); - } - }, - - /** - * init the domain index toggle buttons - */ - initIndexTable : function() { - var togglers = $('img.toggler').click(function() { - var src = $(this).attr('src'); - var idnum = $(this).attr('id').substr(7); - $('tr.cg-' + idnum).toggle(); - if (src.substr(-9) == 'minus.png') - $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); - else - $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); - }).css('display', ''); - if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { - togglers.click(); - } - }, - - /** - * helper function to hide the search marks again - */ - hideSearchWords : function() { - $('#searchbox .highlight-link').fadeOut(300); - $('span.highlighted').removeClass('highlighted'); - }, - - /** - * make the url absolute - */ - makeURL : function(relativeURL) { - return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; - }, - - /** - * get the current relative url - */ - getCurrentURL : function() { - var path = document.location.pathname; - var parts = path.split(/\//); - $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { - if (this == '..') - parts.pop(); - }); - var url = parts.join('/'); - return path.substring(url.lastIndexOf('/') + 1, path.length - 1); - } -}; - -// quick alias for translations -_ = Documentation.gettext; - -$(document).ready(function() { - Documentation.init(); -}); diff --git a/docs/reference/themes/mongodb/static/js/jquery.js b/docs/reference/themes/mongodb/static/js/jquery.js deleted file mode 100644 index bfb2376d2ae..00000000000 --- a/docs/reference/themes/mongodb/static/js/jquery.js +++ /dev/null @@ -1,9789 +0,0 @@ -/*! - * jQuery JavaScript Library v1.10.2 - * http://jquery.com/ - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * - * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2013-07-03T13:48Z - */ -(function( window, undefined ) { - -// Can't do this because several apps including ASP.NET trace -// the stack via arguments.caller.callee and Firefox dies if -// you try to trace through "use strict" call chains. (#13335) -// Support: Firefox 18+ -//"use strict"; -var - // The deferred used on DOM ready - readyList, - - // A central reference to the root jQuery(document) - rootjQuery, - - // Support: IE<10 - // For `typeof xmlNode.method` instead of `xmlNode.method !== undefined` - core_strundefined = typeof undefined, - - // Use the correct document accordingly with window argument (sandbox) - location = window.location, - document = window.document, - docElem = document.documentElement, - - // Map over jQuery in case of overwrite - _jQuery = window.jQuery, - - // Map over the $ in case of overwrite - _$ = window.$, - - // [[Class]] -> type pairs - class2type = {}, - - // List of deleted data cache ids, so we can reuse them - core_deletedIds = [], - - core_version = "1.10.2", - - // Save a reference to some core methods - core_concat = core_deletedIds.concat, - core_push = core_deletedIds.push, - core_slice = core_deletedIds.slice, - core_indexOf = core_deletedIds.indexOf, - core_toString = class2type.toString, - core_hasOwn = class2type.hasOwnProperty, - core_trim = core_version.trim, - - // Define a local copy of jQuery - jQuery = function( selector, context ) { - // The jQuery object is actually just the init constructor 'enhanced' - return new jQuery.fn.init( selector, context, rootjQuery ); - }, - - // Used for matching numbers - core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, - - // Used for splitting on whitespace - core_rnotwhite = /\S+/g, - - // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE) - rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, - - // A simple way to check for HTML strings - // Prioritize #id over to avoid XSS via location.hash (#9521) - // Strict HTML recognition (#11290: must start with <) - rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, - - // Match a standalone tag - rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, - - // JSON RegExp - rvalidchars = /^[\],:{}\s]*$/, - rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, - rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g, - rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g, - - // Matches dashed string for camelizing - rmsPrefix = /^-ms-/, - rdashAlpha = /-([\da-z])/gi, - - // Used by jQuery.camelCase as callback to replace() - fcamelCase = function( all, letter ) { - return letter.toUpperCase(); - }, - - // The ready event handler - completed = function( event ) { - - // readyState === "complete" is good enough for us to call the dom ready in oldIE - if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) { - detach(); - jQuery.ready(); - } - }, - // Clean-up method for dom ready events - detach = function() { - if ( document.addEventListener ) { - document.removeEventListener( "DOMContentLoaded", completed, false ); - window.removeEventListener( "load", completed, false ); - - } else { - document.detachEvent( "onreadystatechange", completed ); - window.detachEvent( "onload", completed ); - } - }; - -jQuery.fn = jQuery.prototype = { - // The current version of jQuery being used - jquery: core_version, - - constructor: jQuery, - init: function( selector, context, rootjQuery ) { - var match, elem; - - // HANDLE: $(""), $(null), $(undefined), $(false) - if ( !selector ) { - return this; - } - - // Handle HTML strings - if ( typeof selector === "string" ) { - if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { - // Assume that strings that start and end with <> are HTML and skip the regex check - match = [ null, selector, null ]; - - } else { - match = rquickExpr.exec( selector ); - } - - // Match html or make sure no context is specified for #id - if ( match && (match[1] || !context) ) { - - // HANDLE: $(html) -> $(array) - if ( match[1] ) { - context = context instanceof jQuery ? context[0] : context; - - // scripts is true for back-compat - jQuery.merge( this, jQuery.parseHTML( - match[1], - context && context.nodeType ? context.ownerDocument || context : document, - true - ) ); - - // HANDLE: $(html, props) - if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { - for ( match in context ) { - // Properties of context are called as methods if possible - if ( jQuery.isFunction( this[ match ] ) ) { - this[ match ]( context[ match ] ); - - // ...and otherwise set as attributes - } else { - this.attr( match, context[ match ] ); - } - } - } - - return this; - - // HANDLE: $(#id) - } else { - elem = document.getElementById( match[2] ); - - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE and Opera return items - // by name instead of ID - if ( elem.id !== match[2] ) { - return rootjQuery.find( selector ); - } - - // Otherwise, we inject the element directly into the jQuery object - this.length = 1; - this[0] = elem; - } - - this.context = document; - this.selector = selector; - return this; - } - - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return ( context || rootjQuery ).find( selector ); - - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return this.constructor( context ).find( selector ); - } - - // HANDLE: $(DOMElement) - } else if ( selector.nodeType ) { - this.context = this[0] = selector; - this.length = 1; - return this; - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) { - return rootjQuery.ready( selector ); - } - - if ( selector.selector !== undefined ) { - this.selector = selector.selector; - this.context = selector.context; - } - - return jQuery.makeArray( selector, this ); - }, - - // Start with an empty selector - selector: "", - - // The default length of a jQuery object is 0 - length: 0, - - toArray: function() { - return core_slice.call( this ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num == null ? - - // Return a 'clean' array - this.toArray() : - - // Return just the object - ( num < 0 ? this[ this.length + num ] : this[ num ] ); - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems ) { - - // Build a new jQuery matched element set - var ret = jQuery.merge( this.constructor(), elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - ret.context = this.context; - - // Return the newly-formed element set - return ret; - }, - - // 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 ); - }, - - ready: function( fn ) { - // Add the callback - jQuery.ready.promise().done( fn ); - - return this; - }, - - slice: function() { - return this.pushStack( core_slice.apply( this, arguments ) ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - eq: function( i ) { - var len = this.length, - j = +i + ( i < 0 ? len : 0 ); - return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map(this, function( elem, i ) { - return callback.call( elem, i, elem ); - })); - }, - - end: function() { - return this.prevObject || this.constructor(null); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: core_push, - sort: [].sort, - splice: [].splice -}; - -// Give the init function the jQuery prototype for later instantiation -jQuery.fn.init.prototype = jQuery.fn; - -jQuery.extend = jQuery.fn.extend = function() { - var src, copyIsArray, copy, name, options, clone, - target = arguments[0] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "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" && !jQuery.isFunction(target) ) { - 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 ( name in options ) { - src = target[ name ]; - copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { - if ( copyIsArray ) { - copyIsArray = false; - clone = src && jQuery.isArray(src) ? src : []; - - } else { - clone = src && jQuery.isPlainObject(src) ? src : {}; - } - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend({ - // Unique for each copy of jQuery on the page - // Non-digits removed to match rinlinejQuery - expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ), - - noConflict: function( deep ) { - if ( window.$ === jQuery ) { - window.$ = _$; - } - - if ( deep && window.jQuery === jQuery ) { - window.jQuery = _jQuery; - } - - return jQuery; - }, - - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - - // Hold (or release) the ready event - holdReady: function( hold ) { - if ( hold ) { - jQuery.readyWait++; - } else { - jQuery.ready( true ); - } - }, - - // Handle when the DOM is ready - ready: function( wait ) { - - // Abort if there are pending holds or we're already ready - if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { - return; - } - - // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). - if ( !document.body ) { - return setTimeout( jQuery.ready ); - } - - // Remember that the DOM is ready - jQuery.isReady = true; - - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; - } - - // If there are functions bound, to execute - readyList.resolveWith( document, [ jQuery ] ); - - // Trigger any bound ready events - if ( jQuery.fn.trigger ) { - jQuery( document ).trigger("ready").off("ready"); - } - }, - - // See test/unit/core.js for details concerning isFunction. - // Since version 1.3, DOM methods and functions like alert - // aren't supported. They return false on IE (#2968). - isFunction: function( obj ) { - return jQuery.type(obj) === "function"; - }, - - isArray: Array.isArray || function( obj ) { - return jQuery.type(obj) === "array"; - }, - - isWindow: function( obj ) { - /* jshint eqeqeq: false */ - return obj != null && obj == obj.window; - }, - - isNumeric: function( obj ) { - return !isNaN( parseFloat(obj) ) && isFinite( obj ); - }, - - type: function( obj ) { - if ( obj == null ) { - return String( obj ); - } - return typeof obj === "object" || typeof obj === "function" ? - class2type[ core_toString.call(obj) ] || "object" : - typeof obj; - }, - - isPlainObject: function( obj ) { - var key; - - // Must be an Object. - // Because of IE, we also have to check the presence of the constructor property. - // Make sure that DOM nodes and window objects don't pass through, as well - if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { - return false; - } - - try { - // Not own constructor property must be Object - if ( obj.constructor && - !core_hasOwn.call(obj, "constructor") && - !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { - return false; - } - } catch ( e ) { - // IE8,9 Will throw exceptions on certain host objects #9897 - return false; - } - - // Support: IE<9 - // Handle iteration over inherited properties before own properties. - if ( jQuery.support.ownLast ) { - for ( key in obj ) { - return core_hasOwn.call( obj, key ); - } - } - - // Own properties are enumerated firstly, so to speed up, - // if last one is own, then all properties are own. - for ( key in obj ) {} - - return key === undefined || core_hasOwn.call( obj, key ); - }, - - isEmptyObject: function( obj ) { - var name; - for ( name in obj ) { - return false; - } - return true; - }, - - error: function( msg ) { - throw new Error( msg ); - }, - - // data: string of html - // context (optional): If specified, the fragment will be created in this context, defaults to document - // keepScripts (optional): If true, will include scripts passed in the html string - parseHTML: function( data, context, keepScripts ) { - if ( !data || typeof data !== "string" ) { - return null; - } - if ( typeof context === "boolean" ) { - keepScripts = context; - context = false; - } - context = context || document; - - var parsed = rsingleTag.exec( data ), - scripts = !keepScripts && []; - - // Single tag - if ( parsed ) { - return [ context.createElement( parsed[1] ) ]; - } - - parsed = jQuery.buildFragment( [ data ], context, scripts ); - if ( scripts ) { - jQuery( scripts ).remove(); - } - return jQuery.merge( [], parsed.childNodes ); - }, - - parseJSON: function( data ) { - // Attempt to parse using the native JSON parser first - if ( window.JSON && window.JSON.parse ) { - return window.JSON.parse( data ); - } - - if ( data === null ) { - return data; - } - - if ( typeof data === "string" ) { - - // Make sure leading/trailing whitespace is removed (IE can't handle it) - data = jQuery.trim( data ); - - if ( data ) { - // Make sure the incoming data is actual JSON - // Logic borrowed from http://json.org/json2.js - if ( rvalidchars.test( data.replace( rvalidescape, "@" ) - .replace( rvalidtokens, "]" ) - .replace( rvalidbraces, "")) ) { - - return ( new Function( "return " + data ) )(); - } - } - } - - jQuery.error( "Invalid JSON: " + data ); - }, - - // Cross-browser xml parsing - parseXML: function( data ) { - var xml, tmp; - if ( !data || typeof data !== "string" ) { - return null; - } - try { - if ( window.DOMParser ) { // Standard - tmp = new DOMParser(); - xml = tmp.parseFromString( data , "text/xml" ); - } else { // IE - xml = new ActiveXObject( "Microsoft.XMLDOM" ); - xml.async = "false"; - xml.loadXML( data ); - } - } catch( e ) { - xml = undefined; - } - if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { - jQuery.error( "Invalid XML: " + data ); - } - return xml; - }, - - noop: function() {}, - - // Evaluates a script in a global context - // Workarounds based on findings by Jim Driscoll - // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context - globalEval: function( data ) { - if ( data && jQuery.trim( data ) ) { - // We use execScript on Internet Explorer - // We use an anonymous function so that context is window - // rather than jQuery in Firefox - ( window.execScript || function( data ) { - window[ "eval" ].call( window, data ); - } )( data ); - } - }, - - // Convert dashed to camelCase; used by the css and data modules - // Microsoft forgot to hump their vendor prefix (#9572) - camelCase: function( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); - }, - - // args is for internal usage only - each: function( obj, callback, args ) { - var value, - i = 0, - length = obj.length, - isArray = isArraylike( obj ); - - if ( args ) { - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback.apply( obj[ i ], args ); - - if ( value === false ) { - break; - } - } - } else { - for ( i in obj ) { - value = callback.apply( obj[ i ], args ); - - if ( value === false ) { - break; - } - } - } - - // A special, fast, case for the most common use of each - } else { - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback.call( obj[ i ], i, obj[ i ] ); - - if ( value === false ) { - break; - } - } - } else { - for ( i in obj ) { - value = callback.call( obj[ i ], i, obj[ i ] ); - - if ( value === false ) { - break; - } - } - } - } - - return obj; - }, - - // Use native String.trim function wherever possible - trim: core_trim && !core_trim.call("\uFEFF\xA0") ? - function( text ) { - return text == null ? - "" : - core_trim.call( text ); - } : - - // Otherwise use our own trimming functionality - function( text ) { - return text == null ? - "" : - ( text + "" ).replace( rtrim, "" ); - }, - - // results is for internal usage only - makeArray: function( arr, results ) { - var ret = results || []; - - if ( arr != null ) { - if ( isArraylike( Object(arr) ) ) { - jQuery.merge( ret, - typeof arr === "string" ? - [ arr ] : arr - ); - } else { - core_push.call( ret, arr ); - } - } - - return ret; - }, - - inArray: function( elem, arr, i ) { - var len; - - if ( arr ) { - if ( core_indexOf ) { - return core_indexOf.call( arr, elem, i ); - } - - len = arr.length; - i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; - - for ( ; i < len; i++ ) { - // Skip accessing in sparse arrays - if ( i in arr && arr[ i ] === elem ) { - return i; - } - } - } - - return -1; - }, - - merge: function( first, second ) { - var l = second.length, - i = first.length, - j = 0; - - if ( typeof l === "number" ) { - for ( ; j < l; j++ ) { - first[ i++ ] = second[ j ]; - } - } else { - while ( second[j] !== undefined ) { - first[ i++ ] = second[ j++ ]; - } - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, inv ) { - var retVal, - ret = [], - i = 0, - length = elems.length; - inv = !!inv; - - // Go through the array, only saving the items - // that pass the validator function - for ( ; i < length; i++ ) { - retVal = !!callback( elems[ i ], i ); - if ( inv !== retVal ) { - ret.push( elems[ i ] ); - } - } - - return ret; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var value, - i = 0, - length = elems.length, - isArray = isArraylike( elems ), - ret = []; - - // Go through the array, translating each of the items to their - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - - // Go through every key on the object, - } else { - for ( i in elems ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - } - - // Flatten any nested arrays - return core_concat.apply( [], ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // Bind a function to a context, optionally partially applying any - // arguments. - proxy: function( fn, context ) { - var args, proxy, tmp; - - if ( typeof context === "string" ) { - tmp = fn[ context ]; - context = fn; - fn = tmp; - } - - // Quick check to determine if target is callable, in the spec - // this throws a TypeError, but we will just return undefined. - if ( !jQuery.isFunction( fn ) ) { - return undefined; - } - - // Simulated bind - args = core_slice.call( arguments, 2 ); - proxy = function() { - return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) ); - }; - - // Set the guid of unique handler to the same of original handler, so it can be removed - proxy.guid = fn.guid = fn.guid || jQuery.guid++; - - return proxy; - }, - - // Multifunctional method to get and set values of a collection - // The value/s can optionally be executed if it's a function - access: function( elems, fn, key, value, chainable, emptyGet, raw ) { - var i = 0, - length = elems.length, - bulk = key == null; - - // Sets many values - if ( jQuery.type( key ) === "object" ) { - chainable = true; - for ( i in key ) { - jQuery.access( elems, fn, i, key[i], true, emptyGet, raw ); - } - - // Sets one value - } else if ( value !== undefined ) { - chainable = true; - - if ( !jQuery.isFunction( value ) ) { - raw = true; - } - - if ( bulk ) { - // Bulk operations run against the entire set - if ( raw ) { - fn.call( elems, value ); - fn = null; - - // ...except when executing function values - } else { - bulk = fn; - fn = function( elem, key, value ) { - return bulk.call( jQuery( elem ), value ); - }; - } - } - - if ( fn ) { - for ( ; i < length; i++ ) { - fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) ); - } - } - } - - return chainable ? - elems : - - // Gets - bulk ? - fn.call( elems ) : - length ? fn( elems[0], key ) : emptyGet; - }, - - now: function() { - return ( new Date() ).getTime(); - }, - - // A method for quickly swapping in/out CSS properties to get correct calculations. - // Note: this method belongs to the css module but it's needed here for the support module. - // If support gets modularized, this method should be moved back to the css module. - swap: function( elem, options, callback, args ) { - var ret, name, - old = {}; - - // Remember the old values, and insert the new ones - for ( name in options ) { - old[ name ] = elem.style[ name ]; - elem.style[ name ] = options[ name ]; - } - - ret = callback.apply( elem, args || [] ); - - // Revert the old values - for ( name in options ) { - elem.style[ name ] = old[ name ]; - } - - return ret; - } -}); - -jQuery.ready.promise = function( obj ) { - if ( !readyList ) { - - readyList = jQuery.Deferred(); - - // Catch cases where $(document).ready() is called after the browser event has already occurred. - // we once tried to use readyState "interactive" here, but it caused issues like the one - // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 - if ( document.readyState === "complete" ) { - // Handle it asynchronously to allow scripts the opportunity to delay ready - setTimeout( jQuery.ready ); - - // Standards-based browsers support DOMContentLoaded - } else if ( document.addEventListener ) { - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", completed, false ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", completed, false ); - - // If IE event model is used - } else { - // Ensure firing before onload, maybe late but safe also for iframes - document.attachEvent( "onreadystatechange", completed ); - - // A fallback to window.onload, that will always work - window.attachEvent( "onload", completed ); - - // If IE and not a frame - // continually check to see if the document is ready - var top = false; - - try { - top = window.frameElement == null && document.documentElement; - } catch(e) {} - - if ( top && top.doScroll ) { - (function doScrollCheck() { - if ( !jQuery.isReady ) { - - try { - // Use the trick by Diego Perini - // http://javascript.nwbox.com/IEContentLoaded/ - top.doScroll("left"); - } catch(e) { - return setTimeout( doScrollCheck, 50 ); - } - - // detach all dom ready events - detach(); - - // and execute any waiting functions - jQuery.ready(); - } - })(); - } - } - } - return readyList.promise( obj ); -}; - -// Populate the class2type map -jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -}); - -function isArraylike( obj ) { - var length = obj.length, - type = jQuery.type( obj ); - - if ( jQuery.isWindow( obj ) ) { - return false; - } - - if ( obj.nodeType === 1 && length ) { - return true; - } - - return type === "array" || type !== "function" && - ( length === 0 || - typeof length === "number" && length > 0 && ( length - 1 ) in obj ); -} - -// All jQuery objects should point back to these -rootjQuery = jQuery(document); -/*! - * Sizzle CSS Selector Engine v1.10.2 - * http://sizzlejs.com/ - * - * Copyright 2013 jQuery Foundation, Inc. and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2013-07-03 - */ -(function( window, undefined ) { - -var i, - support, - cachedruns, - Expr, - getText, - isXML, - compile, - outermostContext, - sortInput, - - // Local document vars - setDocument, - document, - docElem, - documentIsHTML, - rbuggyQSA, - rbuggyMatches, - matches, - contains, - - // Instance-specific data - expando = "sizzle" + -(new Date()), - preferredDoc = window.document, - dirruns = 0, - done = 0, - classCache = createCache(), - tokenCache = createCache(), - compilerCache = createCache(), - hasDuplicate = false, - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - return 0; - } - return 0; - }, - - // General-purpose constants - strundefined = typeof undefined, - MAX_NEGATIVE = 1 << 31, - - // Instance methods - hasOwn = ({}).hasOwnProperty, - arr = [], - pop = arr.pop, - push_native = arr.push, - push = arr.push, - slice = arr.slice, - // Use a stripped-down indexOf if we can't use a native one - indexOf = arr.indexOf || function( elem ) { - var i = 0, - len = this.length; - for ( ; i < len; i++ ) { - if ( this[i] === elem ) { - return i; - } - } - return -1; - }, - - booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", - - // Regular expressions - - // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace - whitespace = "[\\x20\\t\\r\\n\\f]", - // http://www.w3.org/TR/css3-syntax/#characters - characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", - - // Loosely modeled on CSS identifier characters - // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors - // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier - identifier = characterEncoding.replace( "w", "w#" ), - - // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors - attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace + - "*(?:([*^$|!~]?=)" + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]", - - // Prefer arguments quoted, - // then not containing pseudos/brackets, - // then attribute selectors/non-parenthetical expressions, - // then anything else - // These preferences are here to reduce the number of selectors - // needing tokenize in the PSEUDO preFilter - pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)", - - // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), - - rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), - rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), - - rsibling = new RegExp( whitespace + "*[+~]" ), - rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*)" + whitespace + "*\\]", "g" ), - - rpseudo = new RegExp( pseudos ), - ridentifier = new RegExp( "^" + identifier + "$" ), - - matchExpr = { - "ID": new RegExp( "^#(" + characterEncoding + ")" ), - "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), - "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), - "ATTR": new RegExp( "^" + attributes ), - "PSEUDO": new RegExp( "^" + pseudos ), - "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + - "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + - "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), - "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), - // For use in libraries implementing .is() - // We use this for POS matching in `select` - "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + - whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) - }, - - rnative = /^[^{]+\{\s*\[native \w/, - - // Easily-parseable/retrievable ID or TAG or CLASS selectors - rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, - - rinputs = /^(?:input|select|textarea|button)$/i, - rheader = /^h\d$/i, - - rescape = /'|\\/g, - - // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters - runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), - funescape = function( _, escaped, escapedWhitespace ) { - var high = "0x" + escaped - 0x10000; - // NaN means non-codepoint - // Support: Firefox - // Workaround erroneous numeric interpretation of +"0x" - return high !== high || escapedWhitespace ? - escaped : - // BMP codepoint - high < 0 ? - String.fromCharCode( high + 0x10000 ) : - // Supplemental Plane codepoint (surrogate pair) - String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); - }; - -// Optimize for push.apply( _, NodeList ) -try { - push.apply( - (arr = slice.call( preferredDoc.childNodes )), - preferredDoc.childNodes - ); - // Support: Android<4.0 - // Detect silently failing push.apply - arr[ preferredDoc.childNodes.length ].nodeType; -} catch ( e ) { - push = { apply: arr.length ? - - // Leverage slice if possible - function( target, els ) { - push_native.apply( target, slice.call(els) ); - } : - - // Support: IE<9 - // Otherwise append directly - function( target, els ) { - var j = target.length, - i = 0; - // Can't trust NodeList.length - while ( (target[j++] = els[i++]) ) {} - target.length = j - 1; - } - }; -} - -function Sizzle( selector, context, results, seed ) { - var match, elem, m, nodeType, - // QSA vars - i, groups, old, nid, newContext, newSelector; - - if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { - setDocument( context ); - } - - context = context || document; - results = results || []; - - if ( !selector || typeof selector !== "string" ) { - return results; - } - - if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) { - return []; - } - - if ( documentIsHTML && !seed ) { - - // Shortcuts - if ( (match = rquickExpr.exec( selector )) ) { - // Speed-up: Sizzle("#ID") - if ( (m = match[1]) ) { - if ( nodeType === 9 ) { - elem = context.getElementById( m ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE, Opera, and Webkit return items - // by name instead of ID - if ( elem.id === m ) { - results.push( elem ); - return results; - } - } else { - return results; - } - } else { - // Context is not a document - if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && - contains( context, elem ) && elem.id === m ) { - results.push( elem ); - return results; - } - } - - // Speed-up: Sizzle("TAG") - } else if ( match[2] ) { - push.apply( results, context.getElementsByTagName( selector ) ); - return results; - - // Speed-up: Sizzle(".CLASS") - } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) { - push.apply( results, context.getElementsByClassName( m ) ); - return results; - } - } - - // QSA path - if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { - nid = old = expando; - newContext = context; - newSelector = nodeType === 9 && selector; - - // qSA works strangely on Element-rooted queries - // We can work around this by specifying an extra ID on the root - // and working up from there (Thanks to Andrew Dupont for the technique) - // IE 8 doesn't work on object elements - if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { - groups = tokenize( selector ); - - if ( (old = context.getAttribute("id")) ) { - nid = old.replace( rescape, "\\$&" ); - } else { - context.setAttribute( "id", nid ); - } - nid = "[id='" + nid + "'] "; - - i = groups.length; - while ( i-- ) { - groups[i] = nid + toSelector( groups[i] ); - } - newContext = rsibling.test( selector ) && context.parentNode || context; - newSelector = groups.join(","); - } - - if ( newSelector ) { - try { - push.apply( results, - newContext.querySelectorAll( newSelector ) - ); - return results; - } catch(qsaError) { - } finally { - if ( !old ) { - context.removeAttribute("id"); - } - } - } - } - } - - // All others - return select( selector.replace( rtrim, "$1" ), context, results, seed ); -} - -/** - * Create key-value caches of limited size - * @returns {Function(string, Object)} Returns the Object data after storing it on itself with - * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) - * deleting the oldest entry - */ -function createCache() { - var keys = []; - - function cache( key, value ) { - // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) - if ( keys.push( key += " " ) > Expr.cacheLength ) { - // Only keep the most recent entries - delete cache[ keys.shift() ]; - } - return (cache[ key ] = value); - } - return cache; -} - -/** - * Mark a function for special use by Sizzle - * @param {Function} fn The function to mark - */ -function markFunction( fn ) { - fn[ expando ] = true; - return fn; -} - -/** - * Support testing using an element - * @param {Function} fn Passed the created div and expects a boolean result - */ -function assert( fn ) { - var div = document.createElement("div"); - - try { - return !!fn( div ); - } catch (e) { - return false; - } finally { - // Remove from its parent by default - if ( div.parentNode ) { - div.parentNode.removeChild( div ); - } - // release memory in IE - div = null; - } -} - -/** - * Adds the same handler for all of the specified attrs - * @param {String} attrs Pipe-separated list of attributes - * @param {Function} handler The method that will be applied - */ -function addHandle( attrs, handler ) { - var arr = attrs.split("|"), - i = attrs.length; - - while ( i-- ) { - Expr.attrHandle[ arr[i] ] = handler; - } -} - -/** - * Checks document order of two siblings - * @param {Element} a - * @param {Element} b - * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b - */ -function siblingCheck( a, b ) { - var cur = b && a, - diff = cur && a.nodeType === 1 && b.nodeType === 1 && - ( ~b.sourceIndex || MAX_NEGATIVE ) - - ( ~a.sourceIndex || MAX_NEGATIVE ); - - // Use IE sourceIndex if available on both nodes - if ( diff ) { - return diff; - } - - // Check if b follows a - if ( cur ) { - while ( (cur = cur.nextSibling) ) { - if ( cur === b ) { - return -1; - } - } - } - - return a ? 1 : -1; -} - -/** - * Returns a function to use in pseudos for input types - * @param {String} type - */ -function createInputPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for buttons - * @param {String} type - */ -function createButtonPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for positionals - * @param {Function} fn - */ -function createPositionalPseudo( fn ) { - return markFunction(function( argument ) { - argument = +argument; - return markFunction(function( seed, matches ) { - var j, - matchIndexes = fn( [], seed.length, argument ), - i = matchIndexes.length; - - // Match elements found at the specified indexes - while ( i-- ) { - if ( seed[ (j = matchIndexes[i]) ] ) { - seed[j] = !(matches[j] = seed[j]); - } - } - }); - }); -} - -/** - * Detect xml - * @param {Element|Object} elem An element or a document - */ -isXML = Sizzle.isXML = function( elem ) { - // documentElement is verified for cases where it doesn't yet exist - // (such as loading iframes in IE - #4833) - var documentElement = elem && (elem.ownerDocument || elem).documentElement; - return documentElement ? documentElement.nodeName !== "HTML" : false; -}; - -// Expose support vars for convenience -support = Sizzle.support = {}; - -/** - * Sets document-related variables once based on the current document - * @param {Element|Object} [doc] An element or document object to use to set the document - * @returns {Object} Returns the current document - */ -setDocument = Sizzle.setDocument = function( node ) { - var doc = node ? node.ownerDocument || node : preferredDoc, - parent = doc.defaultView; - - // If no document and documentElement is available, return - if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { - return document; - } - - // Set our document - document = doc; - docElem = doc.documentElement; - - // Support tests - documentIsHTML = !isXML( doc ); - - // Support: IE>8 - // If iframe document is assigned to "document" variable and if iframe has been reloaded, - // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936 - // IE6-8 do not support the defaultView property so parent will be undefined - if ( parent && parent.attachEvent && parent !== parent.top ) { - parent.attachEvent( "onbeforeunload", function() { - setDocument(); - }); - } - - /* Attributes - ---------------------------------------------------------------------- */ - - // Support: IE<8 - // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans) - support.attributes = assert(function( div ) { - div.className = "i"; - return !div.getAttribute("className"); - }); - - /* getElement(s)By* - ---------------------------------------------------------------------- */ - - // Check if getElementsByTagName("*") returns only elements - support.getElementsByTagName = assert(function( div ) { - div.appendChild( doc.createComment("") ); - return !div.getElementsByTagName("*").length; - }); - - // Check if getElementsByClassName can be trusted - support.getElementsByClassName = assert(function( div ) { - div.innerHTML = "
    "; - - // Support: Safari<4 - // Catch class over-caching - div.firstChild.className = "i"; - // Support: Opera<10 - // Catch gEBCN failure to find non-leading classes - return div.getElementsByClassName("i").length === 2; - }); - - // Support: IE<10 - // Check if getElementById returns elements by name - // The broken getElementById methods don't pick up programatically-set names, - // so use a roundabout getElementsByName test - support.getById = assert(function( div ) { - docElem.appendChild( div ).id = expando; - return !doc.getElementsByName || !doc.getElementsByName( expando ).length; - }); - - // ID find and filter - if ( support.getById ) { - Expr.find["ID"] = function( id, context ) { - if ( typeof context.getElementById !== strundefined && documentIsHTML ) { - var m = context.getElementById( id ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - return m && m.parentNode ? [m] : []; - } - }; - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - return elem.getAttribute("id") === attrId; - }; - }; - } else { - // Support: IE6/7 - // getElementById is not reliable as a find shortcut - delete Expr.find["ID"]; - - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); - return node && node.value === attrId; - }; - }; - } - - // Tag - Expr.find["TAG"] = support.getElementsByTagName ? - function( tag, context ) { - if ( typeof context.getElementsByTagName !== strundefined ) { - return context.getElementsByTagName( tag ); - } - } : - function( tag, context ) { - var elem, - tmp = [], - i = 0, - results = context.getElementsByTagName( tag ); - - // Filter out possible comments - if ( tag === "*" ) { - while ( (elem = results[i++]) ) { - if ( elem.nodeType === 1 ) { - tmp.push( elem ); - } - } - - return tmp; - } - return results; - }; - - // Class - Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { - if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) { - return context.getElementsByClassName( className ); - } - }; - - /* QSA/matchesSelector - ---------------------------------------------------------------------- */ - - // QSA and matchesSelector support - - // matchesSelector(:active) reports false when true (IE9/Opera 11.5) - rbuggyMatches = []; - - // qSa(:focus) reports false when true (Chrome 21) - // We allow this because of a bug in IE8/9 that throws an error - // whenever `document.activeElement` is accessed on an iframe - // So, we allow :focus to pass through QSA all the time to avoid the IE error - // See http://bugs.jquery.com/ticket/13378 - rbuggyQSA = []; - - if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) { - // Build QSA regex - // Regex strategy adopted from Diego Perini - assert(function( div ) { - // Select is set to empty string on purpose - // This is to test IE's treatment of not explicitly - // setting a boolean content attribute, - // since its presence should be enough - // http://bugs.jquery.com/ticket/12359 - div.innerHTML = ""; - - // Support: IE8 - // Boolean attributes and "value" are not treated correctly - if ( !div.querySelectorAll("[selected]").length ) { - rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); - } - - // Webkit/Opera - :checked should return selected option elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - // IE8 throws error here and will not see later tests - if ( !div.querySelectorAll(":checked").length ) { - rbuggyQSA.push(":checked"); - } - }); - - assert(function( div ) { - - // Support: Opera 10-12/IE8 - // ^= $= *= and empty values - // Should not select anything - // Support: Windows 8 Native Apps - // The type attribute is restricted during .innerHTML assignment - var input = doc.createElement("input"); - input.setAttribute( "type", "hidden" ); - div.appendChild( input ).setAttribute( "t", "" ); - - if ( div.querySelectorAll("[t^='']").length ) { - rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); - } - - // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) - // IE8 throws error here and will not see later tests - if ( !div.querySelectorAll(":enabled").length ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Opera 10-11 does not throw on post-comma invalid pseudos - div.querySelectorAll("*,:x"); - rbuggyQSA.push(",.*:"); - }); - } - - if ( (support.matchesSelector = rnative.test( (matches = docElem.webkitMatchesSelector || - docElem.mozMatchesSelector || - docElem.oMatchesSelector || - docElem.msMatchesSelector) )) ) { - - assert(function( div ) { - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9) - support.disconnectedMatch = matches.call( div, "div" ); - - // This should fail with an exception - // Gecko does not error, returns false instead - matches.call( div, "[s!='']:x" ); - rbuggyMatches.push( "!=", pseudos ); - }); - } - - rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); - rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); - - /* Contains - ---------------------------------------------------------------------- */ - - // Element contains another - // Purposefully does not implement inclusive descendent - // As in, an element does not contain itself - contains = rnative.test( docElem.contains ) || docElem.compareDocumentPosition ? - function( a, b ) { - var adown = a.nodeType === 9 ? a.documentElement : a, - bup = b && b.parentNode; - return a === bup || !!( bup && bup.nodeType === 1 && ( - adown.contains ? - adown.contains( bup ) : - a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 - )); - } : - function( a, b ) { - if ( b ) { - while ( (b = b.parentNode) ) { - if ( b === a ) { - return true; - } - } - } - return false; - }; - - /* Sorting - ---------------------------------------------------------------------- */ - - // Document order sorting - sortOrder = docElem.compareDocumentPosition ? - function( a, b ) { - - // Flag for duplicate removal - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - var compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b ); - - if ( compare ) { - // Disconnected nodes - if ( compare & 1 || - (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { - - // Choose the first element that is related to our preferred document - if ( a === doc || contains(preferredDoc, a) ) { - return -1; - } - if ( b === doc || contains(preferredDoc, b) ) { - return 1; - } - - // Maintain original order - return sortInput ? - ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : - 0; - } - - return compare & 4 ? -1 : 1; - } - - // Not directly comparable, sort on existence of method - return a.compareDocumentPosition ? -1 : 1; - } : - function( a, b ) { - var cur, - i = 0, - aup = a.parentNode, - bup = b.parentNode, - ap = [ a ], - bp = [ b ]; - - // Exit early if the nodes are identical - if ( a === b ) { - hasDuplicate = true; - return 0; - - // Parentless nodes are either documents or disconnected - } else if ( !aup || !bup ) { - return a === doc ? -1 : - b === doc ? 1 : - aup ? -1 : - bup ? 1 : - sortInput ? - ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : - 0; - - // If the nodes are siblings, we can do a quick check - } else if ( aup === bup ) { - return siblingCheck( a, b ); - } - - // Otherwise we need full lists of their ancestors for comparison - cur = a; - while ( (cur = cur.parentNode) ) { - ap.unshift( cur ); - } - cur = b; - while ( (cur = cur.parentNode) ) { - bp.unshift( cur ); - } - - // Walk down the tree looking for a discrepancy - while ( ap[i] === bp[i] ) { - i++; - } - - return i ? - // Do a sibling check if the nodes have a common ancestor - siblingCheck( ap[i], bp[i] ) : - - // Otherwise nodes in our document sort first - ap[i] === preferredDoc ? -1 : - bp[i] === preferredDoc ? 1 : - 0; - }; - - return doc; -}; - -Sizzle.matches = function( expr, elements ) { - return Sizzle( expr, null, null, elements ); -}; - -Sizzle.matchesSelector = function( elem, expr ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - // Make sure that attribute selectors are quoted - expr = expr.replace( rattributeQuotes, "='$1']" ); - - if ( support.matchesSelector && documentIsHTML && - ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && - ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { - - try { - var ret = matches.call( elem, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || support.disconnectedMatch || - // As well, disconnected nodes are said to be in a document - // fragment in IE 9 - elem.document && elem.document.nodeType !== 11 ) { - return ret; - } - } catch(e) {} - } - - return Sizzle( expr, document, null, [elem] ).length > 0; -}; - -Sizzle.contains = function( context, elem ) { - // Set document vars if needed - if ( ( context.ownerDocument || context ) !== document ) { - setDocument( context ); - } - return contains( context, elem ); -}; - -Sizzle.attr = function( elem, name ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - var fn = Expr.attrHandle[ name.toLowerCase() ], - // Don't get fooled by Object.prototype properties (jQuery #13807) - val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? - fn( elem, name, !documentIsHTML ) : - undefined; - - return val === undefined ? - support.attributes || !documentIsHTML ? - elem.getAttribute( name ) : - (val = elem.getAttributeNode(name)) && val.specified ? - val.value : - null : - val; -}; - -Sizzle.error = function( msg ) { - throw new Error( "Syntax error, unrecognized expression: " + msg ); -}; - -/** - * Document sorting and removing duplicates - * @param {ArrayLike} results - */ -Sizzle.uniqueSort = function( results ) { - var elem, - duplicates = [], - j = 0, - i = 0; - - // Unless we *know* we can detect duplicates, assume their presence - hasDuplicate = !support.detectDuplicates; - sortInput = !support.sortStable && results.slice( 0 ); - results.sort( sortOrder ); - - if ( hasDuplicate ) { - while ( (elem = results[i++]) ) { - if ( elem === results[ i ] ) { - j = duplicates.push( i ); - } - } - while ( j-- ) { - results.splice( duplicates[ j ], 1 ); - } - } - - return results; -}; - -/** - * Utility function for retrieving the text value of an array of DOM nodes - * @param {Array|Element} elem - */ -getText = Sizzle.getText = function( elem ) { - var node, - ret = "", - i = 0, - nodeType = elem.nodeType; - - if ( !nodeType ) { - // If no nodeType, this is expected to be an array - for ( ; (node = elem[i]); i++ ) { - // Do not traverse comment nodes - ret += getText( node ); - } - } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { - // Use textContent for elements - // innerText usage removed for consistency of new lines (see #11153) - if ( typeof elem.textContent === "string" ) { - return elem.textContent; - } else { - // Traverse its children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - ret += getText( elem ); - } - } - } else if ( nodeType === 3 || nodeType === 4 ) { - return elem.nodeValue; - } - // Do not include comment or processing instruction nodes - - return ret; -}; - -Expr = Sizzle.selectors = { - - // Can be adjusted by the user - cacheLength: 50, - - createPseudo: markFunction, - - match: matchExpr, - - attrHandle: {}, - - find: {}, - - relative: { - ">": { dir: "parentNode", first: true }, - " ": { dir: "parentNode" }, - "+": { dir: "previousSibling", first: true }, - "~": { dir: "previousSibling" } - }, - - preFilter: { - "ATTR": function( match ) { - match[1] = match[1].replace( runescape, funescape ); - - // Move the given value to match[3] whether quoted or unquoted - match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape ); - - if ( match[2] === "~=" ) { - match[3] = " " + match[3] + " "; - } - - return match.slice( 0, 4 ); - }, - - "CHILD": function( match ) { - /* matches from matchExpr["CHILD"] - 1 type (only|nth|...) - 2 what (child|of-type) - 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) - 4 xn-component of xn+y argument ([+-]?\d*n|) - 5 sign of xn-component - 6 x of xn-component - 7 sign of y-component - 8 y of y-component - */ - match[1] = match[1].toLowerCase(); - - if ( match[1].slice( 0, 3 ) === "nth" ) { - // nth-* requires argument - if ( !match[3] ) { - Sizzle.error( match[0] ); - } - - // numeric x and y parameters for Expr.filter.CHILD - // remember that false/true cast respectively to 0/1 - match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); - match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); - - // other types prohibit arguments - } else if ( match[3] ) { - Sizzle.error( match[0] ); - } - - return match; - }, - - "PSEUDO": function( match ) { - var excess, - unquoted = !match[5] && match[2]; - - if ( matchExpr["CHILD"].test( match[0] ) ) { - return null; - } - - // Accept quoted arguments as-is - if ( match[3] && match[4] !== undefined ) { - match[2] = match[4]; - - // Strip excess characters from unquoted arguments - } else if ( unquoted && rpseudo.test( unquoted ) && - // Get excess from tokenize (recursively) - (excess = tokenize( unquoted, true )) && - // advance to the next closing parenthesis - (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { - - // excess is a negative index - match[0] = match[0].slice( 0, excess ); - match[2] = unquoted.slice( 0, excess ); - } - - // Return only captures needed by the pseudo filter method (type and argument) - return match.slice( 0, 3 ); - } - }, - - filter: { - - "TAG": function( nodeNameSelector ) { - var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); - return nodeNameSelector === "*" ? - function() { return true; } : - function( elem ) { - return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; - }; - }, - - "CLASS": function( className ) { - var pattern = classCache[ className + " " ]; - - return pattern || - (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && - classCache( className, function( elem ) { - return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" ); - }); - }, - - "ATTR": function( name, operator, check ) { - return function( elem ) { - var result = Sizzle.attr( elem, name ); - - if ( result == null ) { - return operator === "!="; - } - if ( !operator ) { - return true; - } - - result += ""; - - return operator === "=" ? result === check : - operator === "!=" ? result !== check : - operator === "^=" ? check && result.indexOf( check ) === 0 : - operator === "*=" ? check && result.indexOf( check ) > -1 : - operator === "$=" ? check && result.slice( -check.length ) === check : - operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 : - operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : - false; - }; - }, - - "CHILD": function( type, what, argument, first, last ) { - var simple = type.slice( 0, 3 ) !== "nth", - forward = type.slice( -4 ) !== "last", - ofType = what === "of-type"; - - return first === 1 && last === 0 ? - - // Shortcut for :nth-*(n) - function( elem ) { - return !!elem.parentNode; - } : - - function( elem, context, xml ) { - var cache, outerCache, node, diff, nodeIndex, start, - dir = simple !== forward ? "nextSibling" : "previousSibling", - parent = elem.parentNode, - name = ofType && elem.nodeName.toLowerCase(), - useCache = !xml && !ofType; - - if ( parent ) { - - // :(first|last|only)-(child|of-type) - if ( simple ) { - while ( dir ) { - node = elem; - while ( (node = node[ dir ]) ) { - if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { - return false; - } - } - // Reverse direction for :only-* (if we haven't yet done so) - start = dir = type === "only" && !start && "nextSibling"; - } - return true; - } - - start = [ forward ? parent.firstChild : parent.lastChild ]; - - // non-xml :nth-child(...) stores cache data on `parent` - if ( forward && useCache ) { - // Seek `elem` from a previously-cached index - outerCache = parent[ expando ] || (parent[ expando ] = {}); - cache = outerCache[ type ] || []; - nodeIndex = cache[0] === dirruns && cache[1]; - diff = cache[0] === dirruns && cache[2]; - node = nodeIndex && parent.childNodes[ nodeIndex ]; - - while ( (node = ++nodeIndex && node && node[ dir ] || - - // Fallback to seeking `elem` from the start - (diff = nodeIndex = 0) || start.pop()) ) { - - // When found, cache indexes on `parent` and break - if ( node.nodeType === 1 && ++diff && node === elem ) { - outerCache[ type ] = [ dirruns, nodeIndex, diff ]; - break; - } - } - - // Use previously-cached element index if available - } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) { - diff = cache[1]; - - // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) - } else { - // Use the same loop as above to seek `elem` from the start - while ( (node = ++nodeIndex && node && node[ dir ] || - (diff = nodeIndex = 0) || start.pop()) ) { - - if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { - // Cache the index of each encountered element - if ( useCache ) { - (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ]; - } - - if ( node === elem ) { - break; - } - } - } - } - - // Incorporate the offset, then check against cycle size - diff -= last; - return diff === first || ( diff % first === 0 && diff / first >= 0 ); - } - }; - }, - - "PSEUDO": function( pseudo, argument ) { - // pseudo-class names are case-insensitive - // http://www.w3.org/TR/selectors/#pseudo-classes - // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters - // Remember that setFilters inherits from pseudos - var args, - fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || - Sizzle.error( "unsupported pseudo: " + pseudo ); - - // The user may use createPseudo to indicate that - // arguments are needed to create the filter function - // just as Sizzle does - if ( fn[ expando ] ) { - return fn( argument ); - } - - // But maintain support for old signatures - if ( fn.length > 1 ) { - args = [ pseudo, pseudo, "", argument ]; - return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? - markFunction(function( seed, matches ) { - var idx, - matched = fn( seed, argument ), - i = matched.length; - while ( i-- ) { - idx = indexOf.call( seed, matched[i] ); - seed[ idx ] = !( matches[ idx ] = matched[i] ); - } - }) : - function( elem ) { - return fn( elem, 0, args ); - }; - } - - return fn; - } - }, - - pseudos: { - // Potentially complex pseudos - "not": markFunction(function( selector ) { - // Trim the selector passed to compile - // to avoid treating leading and trailing - // spaces as combinators - var input = [], - results = [], - matcher = compile( selector.replace( rtrim, "$1" ) ); - - return matcher[ expando ] ? - markFunction(function( seed, matches, context, xml ) { - var elem, - unmatched = matcher( seed, null, xml, [] ), - i = seed.length; - - // Match elements unmatched by `matcher` - while ( i-- ) { - if ( (elem = unmatched[i]) ) { - seed[i] = !(matches[i] = elem); - } - } - }) : - function( elem, context, xml ) { - input[0] = elem; - matcher( input, null, xml, results ); - return !results.pop(); - }; - }), - - "has": markFunction(function( selector ) { - return function( elem ) { - return Sizzle( selector, elem ).length > 0; - }; - }), - - "contains": markFunction(function( text ) { - return function( elem ) { - return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; - }; - }), - - // "Whether an element is represented by a :lang() selector - // is based solely on the element's language value - // being equal to the identifier C, - // or beginning with the identifier C immediately followed by "-". - // The matching of C against the element's language value is performed case-insensitively. - // The identifier C does not have to be a valid language name." - // http://www.w3.org/TR/selectors/#lang-pseudo - "lang": markFunction( function( lang ) { - // lang value must be a valid identifier - if ( !ridentifier.test(lang || "") ) { - Sizzle.error( "unsupported lang: " + lang ); - } - lang = lang.replace( runescape, funescape ).toLowerCase(); - return function( elem ) { - var elemLang; - do { - if ( (elemLang = documentIsHTML ? - elem.lang : - elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { - - elemLang = elemLang.toLowerCase(); - return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; - } - } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); - return false; - }; - }), - - // Miscellaneous - "target": function( elem ) { - var hash = window.location && window.location.hash; - return hash && hash.slice( 1 ) === elem.id; - }, - - "root": function( elem ) { - return elem === docElem; - }, - - "focus": function( elem ) { - return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); - }, - - // Boolean properties - "enabled": function( elem ) { - return elem.disabled === false; - }, - - "disabled": function( elem ) { - return elem.disabled === true; - }, - - "checked": function( elem ) { - // In CSS3, :checked should return both checked and selected elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - var nodeName = elem.nodeName.toLowerCase(); - return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); - }, - - "selected": function( elem ) { - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - // Contents - "empty": function( elem ) { - // http://www.w3.org/TR/selectors/#empty-pseudo - // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)), - // not comment, processing instructions, or others - // Thanks to Diego Perini for the nodeName shortcut - // Greater than "@" means alpha characters (specifically not starting with "#" or "?") - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) { - return false; - } - } - return true; - }, - - "parent": function( elem ) { - return !Expr.pseudos["empty"]( elem ); - }, - - // Element/input types - "header": function( elem ) { - return rheader.test( elem.nodeName ); - }, - - "input": function( elem ) { - return rinputs.test( elem.nodeName ); - }, - - "button": function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === "button" || name === "button"; - }, - - "text": function( elem ) { - var attr; - // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) - // use getAttribute instead to test this case - return elem.nodeName.toLowerCase() === "input" && - elem.type === "text" && - ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type ); - }, - - // Position-in-collection - "first": createPositionalPseudo(function() { - return [ 0 ]; - }), - - "last": createPositionalPseudo(function( matchIndexes, length ) { - return [ length - 1 ]; - }), - - "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { - return [ argument < 0 ? argument + length : argument ]; - }), - - "even": createPositionalPseudo(function( matchIndexes, length ) { - var i = 0; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "odd": createPositionalPseudo(function( matchIndexes, length ) { - var i = 1; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; --i >= 0; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; ++i < length; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }) - } -}; - -Expr.pseudos["nth"] = Expr.pseudos["eq"]; - -// Add button/input type pseudos -for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { - Expr.pseudos[ i ] = createInputPseudo( i ); -} -for ( i in { submit: true, reset: true } ) { - Expr.pseudos[ i ] = createButtonPseudo( i ); -} - -// Easy API for creating new setFilters -function setFilters() {} -setFilters.prototype = Expr.filters = Expr.pseudos; -Expr.setFilters = new setFilters(); - -function tokenize( selector, parseOnly ) { - var matched, match, tokens, type, - soFar, groups, preFilters, - cached = tokenCache[ selector + " " ]; - - if ( cached ) { - return parseOnly ? 0 : cached.slice( 0 ); - } - - soFar = selector; - groups = []; - preFilters = Expr.preFilter; - - while ( soFar ) { - - // Comma and first run - if ( !matched || (match = rcomma.exec( soFar )) ) { - if ( match ) { - // Don't consume trailing commas as valid - soFar = soFar.slice( match[0].length ) || soFar; - } - groups.push( tokens = [] ); - } - - matched = false; - - // Combinators - if ( (match = rcombinators.exec( soFar )) ) { - matched = match.shift(); - tokens.push({ - value: matched, - // Cast descendant combinators to space - type: match[0].replace( rtrim, " " ) - }); - soFar = soFar.slice( matched.length ); - } - - // Filters - for ( type in Expr.filter ) { - if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || - (match = preFilters[ type ]( match ))) ) { - matched = match.shift(); - tokens.push({ - value: matched, - type: type, - matches: match - }); - soFar = soFar.slice( matched.length ); - } - } - - if ( !matched ) { - break; - } - } - - // Return the length of the invalid excess - // if we're just parsing - // Otherwise, throw an error or return tokens - return parseOnly ? - soFar.length : - soFar ? - Sizzle.error( selector ) : - // Cache the tokens - tokenCache( selector, groups ).slice( 0 ); -} - -function toSelector( tokens ) { - var i = 0, - len = tokens.length, - selector = ""; - for ( ; i < len; i++ ) { - selector += tokens[i].value; - } - return selector; -} - -function addCombinator( matcher, combinator, base ) { - var dir = combinator.dir, - checkNonElements = base && dir === "parentNode", - doneName = done++; - - return combinator.first ? - // Check against closest ancestor/preceding element - function( elem, context, xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - return matcher( elem, context, xml ); - } - } - } : - - // Check against all ancestor/preceding elements - function( elem, context, xml ) { - var data, cache, outerCache, - dirkey = dirruns + " " + doneName; - - // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching - if ( xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - if ( matcher( elem, context, xml ) ) { - return true; - } - } - } - } else { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - outerCache = elem[ expando ] || (elem[ expando ] = {}); - if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) { - if ( (data = cache[1]) === true || data === cachedruns ) { - return data === true; - } - } else { - cache = outerCache[ dir ] = [ dirkey ]; - cache[1] = matcher( elem, context, xml ) || cachedruns; - if ( cache[1] === true ) { - return true; - } - } - } - } - } - }; -} - -function elementMatcher( matchers ) { - return matchers.length > 1 ? - function( elem, context, xml ) { - var i = matchers.length; - while ( i-- ) { - if ( !matchers[i]( elem, context, xml ) ) { - return false; - } - } - return true; - } : - matchers[0]; -} - -function condense( unmatched, map, filter, context, xml ) { - var elem, - newUnmatched = [], - i = 0, - len = unmatched.length, - mapped = map != null; - - for ( ; i < len; i++ ) { - if ( (elem = unmatched[i]) ) { - if ( !filter || filter( elem, context, xml ) ) { - newUnmatched.push( elem ); - if ( mapped ) { - map.push( i ); - } - } - } - } - - return newUnmatched; -} - -function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { - if ( postFilter && !postFilter[ expando ] ) { - postFilter = setMatcher( postFilter ); - } - if ( postFinder && !postFinder[ expando ] ) { - postFinder = setMatcher( postFinder, postSelector ); - } - return markFunction(function( seed, results, context, xml ) { - var temp, i, elem, - preMap = [], - postMap = [], - preexisting = results.length, - - // Get initial elements from seed or context - elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), - - // Prefilter to get matcher input, preserving a map for seed-results synchronization - matcherIn = preFilter && ( seed || !selector ) ? - condense( elems, preMap, preFilter, context, xml ) : - elems, - - matcherOut = matcher ? - // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, - postFinder || ( seed ? preFilter : preexisting || postFilter ) ? - - // ...intermediate processing is necessary - [] : - - // ...otherwise use results directly - results : - matcherIn; - - // Find primary matches - if ( matcher ) { - matcher( matcherIn, matcherOut, context, xml ); - } - - // Apply postFilter - if ( postFilter ) { - temp = condense( matcherOut, postMap ); - postFilter( temp, [], context, xml ); - - // Un-match failing elements by moving them back to matcherIn - i = temp.length; - while ( i-- ) { - if ( (elem = temp[i]) ) { - matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); - } - } - } - - if ( seed ) { - if ( postFinder || preFilter ) { - if ( postFinder ) { - // Get the final matcherOut by condensing this intermediate into postFinder contexts - temp = []; - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) ) { - // Restore matcherIn since elem is not yet a final match - temp.push( (matcherIn[i] = elem) ); - } - } - postFinder( null, (matcherOut = []), temp, xml ); - } - - // Move matched elements from seed to results to keep them synchronized - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) && - (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) { - - seed[temp] = !(results[temp] = elem); - } - } - } - - // Add elements to results, through postFinder if defined - } else { - matcherOut = condense( - matcherOut === results ? - matcherOut.splice( preexisting, matcherOut.length ) : - matcherOut - ); - if ( postFinder ) { - postFinder( null, results, matcherOut, xml ); - } else { - push.apply( results, matcherOut ); - } - } - }); -} - -function matcherFromTokens( tokens ) { - var checkContext, matcher, j, - len = tokens.length, - leadingRelative = Expr.relative[ tokens[0].type ], - implicitRelative = leadingRelative || Expr.relative[" "], - i = leadingRelative ? 1 : 0, - - // The foundational matcher ensures that elements are reachable from top-level context(s) - matchContext = addCombinator( function( elem ) { - return elem === checkContext; - }, implicitRelative, true ), - matchAnyContext = addCombinator( function( elem ) { - return indexOf.call( checkContext, elem ) > -1; - }, implicitRelative, true ), - matchers = [ function( elem, context, xml ) { - return ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( - (checkContext = context).nodeType ? - matchContext( elem, context, xml ) : - matchAnyContext( elem, context, xml ) ); - } ]; - - for ( ; i < len; i++ ) { - if ( (matcher = Expr.relative[ tokens[i].type ]) ) { - matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; - } else { - matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); - - // Return special upon seeing a positional matcher - if ( matcher[ expando ] ) { - // Find the next relative operator (if any) for proper handling - j = ++i; - for ( ; j < len; j++ ) { - if ( Expr.relative[ tokens[j].type ] ) { - break; - } - } - return setMatcher( - i > 1 && elementMatcher( matchers ), - i > 1 && toSelector( - // If the preceding token was a descendant combinator, insert an implicit any-element `*` - tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) - ).replace( rtrim, "$1" ), - matcher, - i < j && matcherFromTokens( tokens.slice( i, j ) ), - j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), - j < len && toSelector( tokens ) - ); - } - matchers.push( matcher ); - } - } - - return elementMatcher( matchers ); -} - -function matcherFromGroupMatchers( elementMatchers, setMatchers ) { - // A counter to specify which element is currently being matched - var matcherCachedRuns = 0, - bySet = setMatchers.length > 0, - byElement = elementMatchers.length > 0, - superMatcher = function( seed, context, xml, results, expandContext ) { - var elem, j, matcher, - setMatched = [], - matchedCount = 0, - i = "0", - unmatched = seed && [], - outermost = expandContext != null, - contextBackup = outermostContext, - // We must always have either seed elements or context - elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ), - // Use integer dirruns iff this is the outermost matcher - dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1); - - if ( outermost ) { - outermostContext = context !== document && context; - cachedruns = matcherCachedRuns; - } - - // Add elements passing elementMatchers directly to results - // Keep `i` a string if there are no elements so `matchedCount` will be "00" below - for ( ; (elem = elems[i]) != null; i++ ) { - if ( byElement && elem ) { - j = 0; - while ( (matcher = elementMatchers[j++]) ) { - if ( matcher( elem, context, xml ) ) { - results.push( elem ); - break; - } - } - if ( outermost ) { - dirruns = dirrunsUnique; - cachedruns = ++matcherCachedRuns; - } - } - - // Track unmatched elements for set filters - if ( bySet ) { - // They will have gone through all possible matchers - if ( (elem = !matcher && elem) ) { - matchedCount--; - } - - // Lengthen the array for every element, matched or not - if ( seed ) { - unmatched.push( elem ); - } - } - } - - // Apply set filters to unmatched elements - matchedCount += i; - if ( bySet && i !== matchedCount ) { - j = 0; - while ( (matcher = setMatchers[j++]) ) { - matcher( unmatched, setMatched, context, xml ); - } - - if ( seed ) { - // Reintegrate element matches to eliminate the need for sorting - if ( matchedCount > 0 ) { - while ( i-- ) { - if ( !(unmatched[i] || setMatched[i]) ) { - setMatched[i] = pop.call( results ); - } - } - } - - // Discard index placeholder values to get only actual matches - setMatched = condense( setMatched ); - } - - // Add matches to results - push.apply( results, setMatched ); - - // Seedless set matches succeeding multiple successful matchers stipulate sorting - if ( outermost && !seed && setMatched.length > 0 && - ( matchedCount + setMatchers.length ) > 1 ) { - - Sizzle.uniqueSort( results ); - } - } - - // Override manipulation of globals by nested matchers - if ( outermost ) { - dirruns = dirrunsUnique; - outermostContext = contextBackup; - } - - return unmatched; - }; - - return bySet ? - markFunction( superMatcher ) : - superMatcher; -} - -compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) { - var i, - setMatchers = [], - elementMatchers = [], - cached = compilerCache[ selector + " " ]; - - if ( !cached ) { - // Generate a function of recursive functions that can be used to check each element - if ( !group ) { - group = tokenize( selector ); - } - i = group.length; - while ( i-- ) { - cached = matcherFromTokens( group[i] ); - if ( cached[ expando ] ) { - setMatchers.push( cached ); - } else { - elementMatchers.push( cached ); - } - } - - // Cache the compiled function - cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); - } - return cached; -}; - -function multipleContexts( selector, contexts, results ) { - var i = 0, - len = contexts.length; - for ( ; i < len; i++ ) { - Sizzle( selector, contexts[i], results ); - } - return results; -} - -function select( selector, context, results, seed ) { - var i, tokens, token, type, find, - match = tokenize( selector ); - - if ( !seed ) { - // Try to minimize operations if there is only one group - if ( match.length === 1 ) { - - // Take a shortcut and set the context if the root selector is an ID - tokens = match[0] = match[0].slice( 0 ); - if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && - support.getById && context.nodeType === 9 && documentIsHTML && - Expr.relative[ tokens[1].type ] ) { - - context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; - if ( !context ) { - return results; - } - selector = selector.slice( tokens.shift().value.length ); - } - - // Fetch a seed set for right-to-left matching - i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; - while ( i-- ) { - token = tokens[i]; - - // Abort if we hit a combinator - if ( Expr.relative[ (type = token.type) ] ) { - break; - } - if ( (find = Expr.find[ type ]) ) { - // Search, expanding context for leading sibling combinators - if ( (seed = find( - token.matches[0].replace( runescape, funescape ), - rsibling.test( tokens[0].type ) && context.parentNode || context - )) ) { - - // If seed is empty or no tokens remain, we can return early - tokens.splice( i, 1 ); - selector = seed.length && toSelector( tokens ); - if ( !selector ) { - push.apply( results, seed ); - return results; - } - - break; - } - } - } - } - } - - // Compile and execute a filtering function - // Provide `match` to avoid retokenization if we modified the selector above - compile( selector, match )( - seed, - context, - !documentIsHTML, - results, - rsibling.test( selector ) - ); - return results; -} - -// One-time assignments - -// Sort stability -support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; - -// Support: Chrome<14 -// Always assume duplicates if they aren't passed to the comparison function -support.detectDuplicates = hasDuplicate; - -// Initialize against the default document -setDocument(); - -// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) -// Detached nodes confoundingly follow *each other* -support.sortDetached = assert(function( div1 ) { - // Should return 1, but returns 4 (following) - return div1.compareDocumentPosition( document.createElement("div") ) & 1; -}); - -// Support: IE<8 -// Prevent attribute/property "interpolation" -// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx -if ( !assert(function( div ) { - div.innerHTML = ""; - return div.firstChild.getAttribute("href") === "#" ; -}) ) { - addHandle( "type|href|height|width", function( elem, name, isXML ) { - if ( !isXML ) { - return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); - } - }); -} - -// Support: IE<9 -// Use defaultValue in place of getAttribute("value") -if ( !support.attributes || !assert(function( div ) { - div.innerHTML = ""; - div.firstChild.setAttribute( "value", "" ); - return div.firstChild.getAttribute( "value" ) === ""; -}) ) { - addHandle( "value", function( elem, name, isXML ) { - if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { - return elem.defaultValue; - } - }); -} - -// Support: IE<9 -// Use getAttributeNode to fetch booleans when getAttribute lies -if ( !assert(function( div ) { - return div.getAttribute("disabled") == null; -}) ) { - addHandle( booleans, function( elem, name, isXML ) { - var val; - if ( !isXML ) { - return (val = elem.getAttributeNode( name )) && val.specified ? - val.value : - elem[ name ] === true ? name.toLowerCase() : null; - } - }); -} - -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; -jQuery.expr[":"] = jQuery.expr.pseudos; -jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; - - -})( window ); -// String to Object options format cache -var optionsCache = {}; - -// Convert String-formatted options into Object-formatted ones and store in cache -function createOptions( options ) { - var object = optionsCache[ options ] = {}; - jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) { - object[ flag ] = true; - }); - return object; -} - -/* - * Create a callback list using the following parameters: - * - * options: an optional list of space-separated options that will change how - * the callback list behaves or a more traditional option object - * - * By default a callback list will act like an event callback list and can be - * "fired" multiple times. - * - * Possible options: - * - * once: will ensure the callback list can only be fired once (like a Deferred) - * - * memory: will keep track of previous values and will call any callback added - * after the list has been fired right away with the latest "memorized" - * values (like a Deferred) - * - * unique: will ensure a callback can only be added once (no duplicate in the list) - * - * stopOnFalse: interrupt callings when a callback returns false - * - */ -jQuery.Callbacks = function( options ) { - - // Convert options from String-formatted to Object-formatted if needed - // (we check in cache first) - options = typeof options === "string" ? - ( optionsCache[ options ] || createOptions( options ) ) : - jQuery.extend( {}, options ); - - var // Flag to know if list is currently firing - firing, - // Last fire value (for non-forgettable lists) - memory, - // Flag to know if list was already fired - fired, - // End of the loop when firing - firingLength, - // Index of currently firing callback (modified by remove if needed) - firingIndex, - // First callback to fire (used internally by add and fireWith) - firingStart, - // Actual callback list - list = [], - // Stack of fire calls for repeatable lists - stack = !options.once && [], - // Fire callbacks - fire = function( data ) { - memory = options.memory && data; - fired = true; - firingIndex = firingStart || 0; - firingStart = 0; - firingLength = list.length; - firing = true; - for ( ; list && firingIndex < firingLength; firingIndex++ ) { - if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { - memory = false; // To prevent further calls using add - break; - } - } - firing = false; - if ( list ) { - if ( stack ) { - if ( stack.length ) { - fire( stack.shift() ); - } - } else if ( memory ) { - list = []; - } else { - self.disable(); - } - } - }, - // Actual Callbacks object - self = { - // Add a callback or a collection of callbacks to the list - add: function() { - if ( list ) { - // First, we save the current length - var start = list.length; - (function add( args ) { - jQuery.each( args, function( _, arg ) { - var type = jQuery.type( arg ); - if ( type === "function" ) { - if ( !options.unique || !self.has( arg ) ) { - list.push( arg ); - } - } else if ( arg && arg.length && type !== "string" ) { - // Inspect recursively - add( arg ); - } - }); - })( arguments ); - // Do we need to add the callbacks to the - // current firing batch? - if ( firing ) { - firingLength = list.length; - // With memory, if we're not firing then - // we should call right away - } else if ( memory ) { - firingStart = start; - fire( memory ); - } - } - return this; - }, - // Remove a callback from the list - remove: function() { - if ( list ) { - jQuery.each( arguments, function( _, arg ) { - var index; - while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { - list.splice( index, 1 ); - // Handle firing indexes - if ( firing ) { - if ( index <= firingLength ) { - firingLength--; - } - if ( index <= firingIndex ) { - firingIndex--; - } - } - } - }); - } - return this; - }, - // Check if a given callback is in the list. - // If no argument is given, return whether or not list has callbacks attached. - has: function( fn ) { - return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length ); - }, - // Remove all callbacks from the list - empty: function() { - list = []; - firingLength = 0; - return this; - }, - // Have the list do nothing anymore - disable: function() { - list = stack = memory = undefined; - return this; - }, - // Is it disabled? - disabled: function() { - return !list; - }, - // Lock the list in its current state - lock: function() { - stack = undefined; - if ( !memory ) { - self.disable(); - } - return this; - }, - // Is it locked? - locked: function() { - return !stack; - }, - // Call all callbacks with the given context and arguments - fireWith: function( context, args ) { - if ( list && ( !fired || stack ) ) { - args = args || []; - args = [ context, args.slice ? args.slice() : args ]; - if ( firing ) { - stack.push( args ); - } else { - fire( args ); - } - } - return this; - }, - // Call all the callbacks with the given arguments - fire: function() { - self.fireWith( this, arguments ); - return this; - }, - // To know if the callbacks have already been called at least once - fired: function() { - return !!fired; - } - }; - - return self; -}; -jQuery.extend({ - - Deferred: function( func ) { - var tuples = [ - // action, add listener, listener list, final state - [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], - [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], - [ "notify", "progress", jQuery.Callbacks("memory") ] - ], - state = "pending", - promise = { - state: function() { - return state; - }, - always: function() { - deferred.done( arguments ).fail( arguments ); - return this; - }, - then: function( /* fnDone, fnFail, fnProgress */ ) { - var fns = arguments; - return jQuery.Deferred(function( newDefer ) { - jQuery.each( tuples, function( i, tuple ) { - var action = tuple[ 0 ], - fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; - // deferred[ done | fail | progress ] for forwarding actions to newDefer - deferred[ tuple[1] ](function() { - var returned = fn && fn.apply( this, arguments ); - if ( returned && jQuery.isFunction( returned.promise ) ) { - returned.promise() - .done( newDefer.resolve ) - .fail( newDefer.reject ) - .progress( newDefer.notify ); - } else { - newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments ); - } - }); - }); - fns = null; - }).promise(); - }, - // Get a promise for this deferred - // If obj is provided, the promise aspect is added to the object - promise: function( obj ) { - return obj != null ? jQuery.extend( obj, promise ) : promise; - } - }, - deferred = {}; - - // Keep pipe for back-compat - promise.pipe = promise.then; - - // Add list-specific methods - jQuery.each( tuples, function( i, tuple ) { - var list = tuple[ 2 ], - stateString = tuple[ 3 ]; - - // promise[ done | fail | progress ] = list.add - promise[ tuple[1] ] = list.add; - - // Handle state - if ( stateString ) { - list.add(function() { - // state = [ resolved | rejected ] - state = stateString; - - // [ reject_list | resolve_list ].disable; progress_list.lock - }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); - } - - // deferred[ resolve | reject | notify ] - deferred[ tuple[0] ] = function() { - deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments ); - return this; - }; - deferred[ tuple[0] + "With" ] = list.fireWith; - }); - - // Make the deferred a promise - promise.promise( deferred ); - - // Call given func if any - if ( func ) { - func.call( deferred, deferred ); - } - - // All done! - return deferred; - }, - - // Deferred helper - when: function( subordinate /* , ..., subordinateN */ ) { - var i = 0, - resolveValues = core_slice.call( arguments ), - length = resolveValues.length, - - // the count of uncompleted subordinates - remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, - - // the master Deferred. If resolveValues consist of only a single Deferred, just use that. - deferred = remaining === 1 ? subordinate : jQuery.Deferred(), - - // Update function for both resolve and progress values - updateFunc = function( i, contexts, values ) { - return function( value ) { - contexts[ i ] = this; - values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value; - if( values === progressValues ) { - deferred.notifyWith( contexts, values ); - } else if ( !( --remaining ) ) { - deferred.resolveWith( contexts, values ); - } - }; - }, - - progressValues, progressContexts, resolveContexts; - - // add listeners to Deferred subordinates; treat others as resolved - if ( length > 1 ) { - progressValues = new Array( length ); - progressContexts = new Array( length ); - resolveContexts = new Array( length ); - for ( ; i < length; i++ ) { - if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { - resolveValues[ i ].promise() - .done( updateFunc( i, resolveContexts, resolveValues ) ) - .fail( deferred.reject ) - .progress( updateFunc( i, progressContexts, progressValues ) ); - } else { - --remaining; - } - } - } - - // if we're not waiting on anything, resolve the master - if ( !remaining ) { - deferred.resolveWith( resolveContexts, resolveValues ); - } - - return deferred.promise(); - } -}); -jQuery.support = (function( support ) { - - var all, a, input, select, fragment, opt, eventName, isSupported, i, - div = document.createElement("div"); - - // Setup - div.setAttribute( "className", "t" ); - div.innerHTML = "
    a"; - - // Finish early in limited (non-browser) environments - all = div.getElementsByTagName("*") || []; - a = div.getElementsByTagName("a")[ 0 ]; - if ( !a || !a.style || !all.length ) { - return support; - } - - // First batch of tests - select = document.createElement("select"); - opt = select.appendChild( document.createElement("option") ); - input = div.getElementsByTagName("input")[ 0 ]; - - a.style.cssText = "top:1px;float:left;opacity:.5"; - - // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) - support.getSetAttribute = div.className !== "t"; - - // IE strips leading whitespace when .innerHTML is used - support.leadingWhitespace = div.firstChild.nodeType === 3; - - // Make sure that tbody elements aren't automatically inserted - // IE will insert them into empty tables - support.tbody = !div.getElementsByTagName("tbody").length; - - // Make sure that link elements get serialized correctly by innerHTML - // This requires a wrapper element in IE - support.htmlSerialize = !!div.getElementsByTagName("link").length; - - // Get the style information from getAttribute - // (IE uses .cssText instead) - support.style = /top/.test( a.getAttribute("style") ); - - // Make sure that URLs aren't manipulated - // (IE normalizes it by default) - support.hrefNormalized = a.getAttribute("href") === "/a"; - - // Make sure that element opacity exists - // (IE uses filter instead) - // Use a regex to work around a WebKit issue. See #5145 - support.opacity = /^0.5/.test( a.style.opacity ); - - // Verify style float existence - // (IE uses styleFloat instead of cssFloat) - support.cssFloat = !!a.style.cssFloat; - - // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere) - support.checkOn = !!input.value; - - // Make sure that a selected-by-default option has a working selected property. - // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) - support.optSelected = opt.selected; - - // Tests for enctype support on a form (#6743) - support.enctype = !!document.createElement("form").enctype; - - // Makes sure cloning an html5 element does not cause problems - // Where outerHTML is undefined, this still works - support.html5Clone = document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav>"; - - // Will be defined later - support.inlineBlockNeedsLayout = false; - support.shrinkWrapBlocks = false; - support.pixelPosition = false; - support.deleteExpando = true; - support.noCloneEvent = true; - support.reliableMarginRight = true; - support.boxSizingReliable = true; - - // Make sure checked status is properly cloned - input.checked = true; - support.noCloneChecked = input.cloneNode( true ).checked; - - // Make sure that the options inside disabled selects aren't marked as disabled - // (WebKit marks them as disabled) - select.disabled = true; - support.optDisabled = !opt.disabled; - - // Support: IE<9 - try { - delete div.test; - } catch( e ) { - support.deleteExpando = false; - } - - // Check if we can trust getAttribute("value") - input = document.createElement("input"); - input.setAttribute( "value", "" ); - support.input = input.getAttribute( "value" ) === ""; - - // Check if an input maintains its value after becoming a radio - input.value = "t"; - input.setAttribute( "type", "radio" ); - support.radioValue = input.value === "t"; - - // #11217 - WebKit loses check when the name is after the checked attribute - input.setAttribute( "checked", "t" ); - input.setAttribute( "name", "t" ); - - fragment = document.createDocumentFragment(); - fragment.appendChild( input ); - - // Check if a disconnected checkbox will retain its checked - // value of true after appended to the DOM (IE6/7) - support.appendChecked = input.checked; - - // WebKit doesn't clone checked state correctly in fragments - support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; - - // Support: IE<9 - // Opera does not clone events (and typeof div.attachEvent === undefined). - // IE9-10 clones events bound via attachEvent, but they don't trigger with .click() - if ( div.attachEvent ) { - div.attachEvent( "onclick", function() { - support.noCloneEvent = false; - }); - - div.cloneNode( true ).click(); - } - - // Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event) - // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP) - for ( i in { submit: true, change: true, focusin: true }) { - div.setAttribute( eventName = "on" + i, "t" ); - - support[ i + "Bubbles" ] = eventName in window || div.attributes[ eventName ].expando === false; - } - - div.style.backgroundClip = "content-box"; - div.cloneNode( true ).style.backgroundClip = ""; - support.clearCloneStyle = div.style.backgroundClip === "content-box"; - - // Support: IE<9 - // Iteration over object's inherited properties before its own. - for ( i in jQuery( support ) ) { - break; - } - support.ownLast = i !== "0"; - - // Run tests that need a body at doc ready - jQuery(function() { - var container, marginDiv, tds, - divReset = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;", - body = document.getElementsByTagName("body")[0]; - - if ( !body ) { - // Return for frameset docs that don't have a body - return; - } - - container = document.createElement("div"); - container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px"; - - body.appendChild( container ).appendChild( div ); - - // Support: IE8 - // Check if table cells still have offsetWidth/Height when they are set - // to display:none and there are still other visible table cells in a - // table row; if so, offsetWidth/Height are not reliable for use when - // determining if an element has been hidden directly using - // display:none (it is still safe to use offsets if a parent element is - // hidden; don safety goggles and see bug #4512 for more information). - div.innerHTML = "
    t
    "; - tds = div.getElementsByTagName("td"); - tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none"; - isSupported = ( tds[ 0 ].offsetHeight === 0 ); - - tds[ 0 ].style.display = ""; - tds[ 1 ].style.display = "none"; - - // Support: IE8 - // Check if empty table cells still have offsetWidth/Height - support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); - - // Check box-sizing and margin behavior. - div.innerHTML = ""; - div.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%;"; - - // Workaround failing boxSizing test due to offsetWidth returning wrong value - // with some non-1 values of body zoom, ticket #13543 - jQuery.swap( body, body.style.zoom != null ? { zoom: 1 } : {}, function() { - support.boxSizing = div.offsetWidth === 4; - }); - - // Use window.getComputedStyle because jsdom on node.js will break without it. - if ( window.getComputedStyle ) { - support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%"; - support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px"; - - // Check if div with explicit width and no margin-right incorrectly - // gets computed margin-right based on width of container. (#3333) - // Fails in WebKit before Feb 2011 nightlies - // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right - marginDiv = div.appendChild( document.createElement("div") ); - marginDiv.style.cssText = div.style.cssText = divReset; - marginDiv.style.marginRight = marginDiv.style.width = "0"; - div.style.width = "1px"; - - support.reliableMarginRight = - !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight ); - } - - if ( typeof div.style.zoom !== core_strundefined ) { - // Support: IE<8 - // Check if natively block-level elements act like inline-block - // elements when setting their display to 'inline' and giving - // them layout - div.innerHTML = ""; - div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1"; - support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 ); - - // Support: IE6 - // Check if elements with layout shrink-wrap their children - div.style.display = "block"; - div.innerHTML = "
    "; - div.firstChild.style.width = "5px"; - support.shrinkWrapBlocks = ( div.offsetWidth !== 3 ); - - if ( support.inlineBlockNeedsLayout ) { - // Prevent IE 6 from affecting layout for positioned elements #11048 - // Prevent IE from shrinking the body in IE 7 mode #12869 - // Support: IE<8 - body.style.zoom = 1; - } - } - - body.removeChild( container ); - - // Null elements to avoid leaks in IE - container = div = tds = marginDiv = null; - }); - - // Null elements to avoid leaks in IE - all = select = fragment = opt = a = input = null; - - return support; -})({}); - -var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/, - rmultiDash = /([A-Z])/g; - -function internalData( elem, name, data, pvt /* Internal Use Only */ ){ - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var ret, thisCache, - internalKey = jQuery.expando, - - // We have to handle DOM nodes and JS objects differently because IE6-7 - // can't GC object references properly across the DOM-JS boundary - isNode = elem.nodeType, - - // Only DOM nodes need the global jQuery cache; JS object data is - // attached directly to the object so GC can occur automatically - cache = isNode ? jQuery.cache : elem, - - // Only defining an ID for JS objects if its cache already exists allows - // the code to shortcut on the same path as a DOM node with no cache - id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey; - - // Avoid doing any more work than we need to when trying to get data on an - // object that has no data at all - if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && data === undefined && typeof name === "string" ) { - return; - } - - if ( !id ) { - // Only DOM nodes need a new unique ID for each element since their data - // ends up in the global cache - if ( isNode ) { - id = elem[ internalKey ] = core_deletedIds.pop() || jQuery.guid++; - } else { - id = internalKey; - } - } - - if ( !cache[ id ] ) { - // Avoid exposing jQuery metadata on plain JS objects when the object - // is serialized using JSON.stringify - cache[ id ] = isNode ? {} : { toJSON: jQuery.noop }; - } - - // An object can be passed to jQuery.data instead of a key/value pair; this gets - // shallow copied over onto the existing cache - if ( typeof name === "object" || typeof name === "function" ) { - if ( pvt ) { - cache[ id ] = jQuery.extend( cache[ id ], name ); - } else { - cache[ id ].data = jQuery.extend( cache[ id ].data, name ); - } - } - - thisCache = cache[ id ]; - - // jQuery data() is stored in a separate object inside the object's internal data - // cache in order to avoid key collisions between internal data and user-defined - // data. - if ( !pvt ) { - if ( !thisCache.data ) { - thisCache.data = {}; - } - - thisCache = thisCache.data; - } - - if ( data !== undefined ) { - thisCache[ jQuery.camelCase( name ) ] = data; - } - - // Check for both converted-to-camel and non-converted data property names - // If a data property was specified - if ( typeof name === "string" ) { - - // First Try to find as-is property data - ret = thisCache[ name ]; - - // Test for null|undefined property data - if ( ret == null ) { - - // Try to find the camelCased property - ret = thisCache[ jQuery.camelCase( name ) ]; - } - } else { - ret = thisCache; - } - - return ret; -} - -function internalRemoveData( elem, name, pvt ) { - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var thisCache, i, - isNode = elem.nodeType, - - // See jQuery.data for more information - cache = isNode ? jQuery.cache : elem, - id = isNode ? elem[ jQuery.expando ] : jQuery.expando; - - // If there is already no cache entry for this object, there is no - // purpose in continuing - if ( !cache[ id ] ) { - return; - } - - if ( name ) { - - thisCache = pvt ? cache[ id ] : cache[ id ].data; - - if ( thisCache ) { - - // Support array or space separated string names for data keys - if ( !jQuery.isArray( name ) ) { - - // try the string as a key before any manipulation - if ( name in thisCache ) { - name = [ name ]; - } else { - - // split the camel cased version by spaces unless a key with the spaces exists - name = jQuery.camelCase( name ); - if ( name in thisCache ) { - name = [ name ]; - } else { - name = name.split(" "); - } - } - } else { - // If "name" is an array of keys... - // When data is initially created, via ("key", "val") signature, - // keys will be converted to camelCase. - // Since there is no way to tell _how_ a key was added, remove - // both plain key and camelCase key. #12786 - // This will only penalize the array argument path. - name = name.concat( jQuery.map( name, jQuery.camelCase ) ); - } - - i = name.length; - while ( i-- ) { - delete thisCache[ name[i] ]; - } - - // If there is no data left in the cache, we want to continue - // and let the cache object itself get destroyed - if ( pvt ? !isEmptyDataObject(thisCache) : !jQuery.isEmptyObject(thisCache) ) { - return; - } - } - } - - // See jQuery.data for more information - if ( !pvt ) { - delete cache[ id ].data; - - // Don't destroy the parent cache unless the internal data object - // had been the only thing left in it - if ( !isEmptyDataObject( cache[ id ] ) ) { - return; - } - } - - // Destroy the cache - if ( isNode ) { - jQuery.cleanData( [ elem ], true ); - - // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) - /* jshint eqeqeq: false */ - } else if ( jQuery.support.deleteExpando || cache != cache.window ) { - /* jshint eqeqeq: true */ - delete cache[ id ]; - - // When all else fails, null - } else { - cache[ id ] = null; - } -} - -jQuery.extend({ - cache: {}, - - // The following elements throw uncatchable exceptions if you - // attempt to add expando properties to them. - noData: { - "applet": true, - "embed": true, - // Ban all objects except for Flash (which handle expandos) - "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" - }, - - hasData: function( elem ) { - elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; - return !!elem && !isEmptyDataObject( elem ); - }, - - data: function( elem, name, data ) { - return internalData( elem, name, data ); - }, - - removeData: function( elem, name ) { - return internalRemoveData( elem, name ); - }, - - // For internal use only. - _data: function( elem, name, data ) { - return internalData( elem, name, data, true ); - }, - - _removeData: function( elem, name ) { - return internalRemoveData( elem, name, true ); - }, - - // A method for determining if a DOM node can handle the data expando - acceptData: function( elem ) { - // Do not set data on non-element because it will not be cleared (#8335). - if ( elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9 ) { - return false; - } - - var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ]; - - // nodes accept data unless otherwise specified; rejection can be conditional - return !noData || noData !== true && elem.getAttribute("classid") === noData; - } -}); - -jQuery.fn.extend({ - data: function( key, value ) { - var attrs, name, - data = null, - i = 0, - elem = this[0]; - - // Special expections of .data basically thwart jQuery.access, - // so implement the relevant behavior ourselves - - // Gets all values - if ( key === undefined ) { - if ( this.length ) { - data = jQuery.data( elem ); - - if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { - attrs = elem.attributes; - for ( ; i < attrs.length; i++ ) { - name = attrs[i].name; - - if ( name.indexOf("data-") === 0 ) { - name = jQuery.camelCase( name.slice(5) ); - - dataAttr( elem, name, data[ name ] ); - } - } - jQuery._data( elem, "parsedAttrs", true ); - } - } - - return data; - } - - // Sets multiple values - if ( typeof key === "object" ) { - return this.each(function() { - jQuery.data( this, key ); - }); - } - - return arguments.length > 1 ? - - // Sets one value - this.each(function() { - jQuery.data( this, key, value ); - }) : - - // Gets one value - // Try to fetch any internally stored data first - elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null; - }, - - removeData: function( key ) { - return this.each(function() { - jQuery.removeData( this, key ); - }); - } -}); - -function dataAttr( elem, key, data ) { - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - - var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); - - data = elem.getAttribute( name ); - - if ( typeof data === "string" ) { - try { - data = data === "true" ? true : - data === "false" ? false : - data === "null" ? null : - // Only convert to a number if it doesn't change the string - +data + "" === data ? +data : - rbrace.test( data ) ? jQuery.parseJSON( data ) : - data; - } catch( e ) {} - - // Make sure we set the data so it isn't changed later - jQuery.data( elem, key, data ); - - } else { - data = undefined; - } - } - - return data; -} - -// checks a cache object for emptiness -function isEmptyDataObject( obj ) { - var name; - for ( name in obj ) { - - // if the public data object is empty, the private is still empty - if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { - continue; - } - if ( name !== "toJSON" ) { - return false; - } - } - - return true; -} -jQuery.extend({ - queue: function( elem, type, data ) { - var queue; - - if ( elem ) { - type = ( type || "fx" ) + "queue"; - queue = jQuery._data( elem, type ); - - // Speed up dequeue by getting out quickly if this is just a lookup - if ( data ) { - if ( !queue || jQuery.isArray(data) ) { - queue = jQuery._data( elem, type, jQuery.makeArray(data) ); - } else { - queue.push( data ); - } - } - return queue || []; - } - }, - - dequeue: function( elem, type ) { - type = type || "fx"; - - var queue = jQuery.queue( elem, type ), - startLength = queue.length, - fn = queue.shift(), - hooks = jQuery._queueHooks( elem, type ), - next = function() { - jQuery.dequeue( elem, type ); - }; - - // If the fx queue is dequeued, always remove the progress sentinel - if ( fn === "inprogress" ) { - fn = queue.shift(); - startLength--; - } - - if ( fn ) { - - // Add a progress sentinel to prevent the fx queue from being - // automatically dequeued - if ( type === "fx" ) { - queue.unshift( "inprogress" ); - } - - // clear up the last queue stop function - delete hooks.stop; - fn.call( elem, next, hooks ); - } - - if ( !startLength && hooks ) { - hooks.empty.fire(); - } - }, - - // not intended for public consumption - generates a queueHooks object, or returns the current one - _queueHooks: function( elem, type ) { - var key = type + "queueHooks"; - return jQuery._data( elem, key ) || jQuery._data( elem, key, { - empty: jQuery.Callbacks("once memory").add(function() { - jQuery._removeData( elem, type + "queue" ); - jQuery._removeData( elem, key ); - }) - }); - } -}); - -jQuery.fn.extend({ - queue: function( type, data ) { - var setter = 2; - - if ( typeof type !== "string" ) { - data = type; - type = "fx"; - setter--; - } - - if ( arguments.length < setter ) { - return jQuery.queue( this[0], type ); - } - - return data === undefined ? - this : - this.each(function() { - var queue = jQuery.queue( this, type, data ); - - // ensure a hooks for this queue - jQuery._queueHooks( this, type ); - - if ( type === "fx" && queue[0] !== "inprogress" ) { - jQuery.dequeue( this, type ); - } - }); - }, - dequeue: function( type ) { - return this.each(function() { - jQuery.dequeue( this, type ); - }); - }, - // Based off of the plugin by Clint Helfers, with permission. - // http://blindsignals.com/index.php/2009/07/jquery-delay/ - delay: function( time, type ) { - time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; - type = type || "fx"; - - return this.queue( type, function( next, hooks ) { - var timeout = setTimeout( next, time ); - hooks.stop = function() { - clearTimeout( timeout ); - }; - }); - }, - clearQueue: function( type ) { - return this.queue( type || "fx", [] ); - }, - // Get a promise resolved when queues of a certain type - // are emptied (fx is the type by default) - promise: function( type, obj ) { - var tmp, - count = 1, - defer = jQuery.Deferred(), - elements = this, - i = this.length, - resolve = function() { - if ( !( --count ) ) { - defer.resolveWith( elements, [ elements ] ); - } - }; - - if ( typeof type !== "string" ) { - obj = type; - type = undefined; - } - type = type || "fx"; - - while( i-- ) { - tmp = jQuery._data( elements[ i ], type + "queueHooks" ); - if ( tmp && tmp.empty ) { - count++; - tmp.empty.add( resolve ); - } - } - resolve(); - return defer.promise( obj ); - } -}); -var nodeHook, boolHook, - rclass = /[\t\r\n\f]/g, - rreturn = /\r/g, - rfocusable = /^(?:input|select|textarea|button|object)$/i, - rclickable = /^(?:a|area)$/i, - ruseDefault = /^(?:checked|selected)$/i, - getSetAttribute = jQuery.support.getSetAttribute, - getSetInput = jQuery.support.input; - -jQuery.fn.extend({ - attr: function( name, value ) { - return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 ); - }, - - removeAttr: function( name ) { - return this.each(function() { - jQuery.removeAttr( this, name ); - }); - }, - - prop: function( name, value ) { - return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 ); - }, - - removeProp: function( name ) { - name = jQuery.propFix[ name ] || name; - return this.each(function() { - // try/catch handles cases where IE balks (such as removing a property on window) - try { - this[ name ] = undefined; - delete this[ name ]; - } catch( e ) {} - }); - }, - - addClass: function( value ) { - var classes, elem, cur, clazz, j, - i = 0, - len = this.length, - proceed = typeof value === "string" && value; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).addClass( value.call( this, j, this.className ) ); - }); - } - - if ( proceed ) { - // The disjunction here is for better compressibility (see removeClass) - classes = ( value || "" ).match( core_rnotwhite ) || []; - - for ( ; i < len; i++ ) { - elem = this[ i ]; - cur = elem.nodeType === 1 && ( elem.className ? - ( " " + elem.className + " " ).replace( rclass, " " ) : - " " - ); - - if ( cur ) { - j = 0; - while ( (clazz = classes[j++]) ) { - if ( cur.indexOf( " " + clazz + " " ) < 0 ) { - cur += clazz + " "; - } - } - elem.className = jQuery.trim( cur ); - - } - } - } - - return this; - }, - - removeClass: function( value ) { - var classes, elem, cur, clazz, j, - i = 0, - len = this.length, - proceed = arguments.length === 0 || typeof value === "string" && value; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).removeClass( value.call( this, j, this.className ) ); - }); - } - if ( proceed ) { - classes = ( value || "" ).match( core_rnotwhite ) || []; - - for ( ; i < len; i++ ) { - elem = this[ i ]; - // This expression is here for better compressibility (see addClass) - cur = elem.nodeType === 1 && ( elem.className ? - ( " " + elem.className + " " ).replace( rclass, " " ) : - "" - ); - - if ( cur ) { - j = 0; - while ( (clazz = classes[j++]) ) { - // Remove *all* instances - while ( cur.indexOf( " " + clazz + " " ) >= 0 ) { - cur = cur.replace( " " + clazz + " ", " " ); - } - } - elem.className = value ? jQuery.trim( cur ) : ""; - } - } - } - - return this; - }, - - toggleClass: function( value, stateVal ) { - var type = typeof value; - - if ( typeof stateVal === "boolean" && type === "string" ) { - return stateVal ? this.addClass( value ) : this.removeClass( value ); - } - - if ( jQuery.isFunction( value ) ) { - return this.each(function( i ) { - jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); - }); - } - - return this.each(function() { - if ( type === "string" ) { - // toggle individual class names - var className, - i = 0, - self = jQuery( this ), - classNames = value.match( core_rnotwhite ) || []; - - while ( (className = classNames[ i++ ]) ) { - // check each className given, space separated list - if ( self.hasClass( className ) ) { - self.removeClass( className ); - } else { - self.addClass( className ); - } - } - - // Toggle whole class name - } else if ( type === core_strundefined || type === "boolean" ) { - if ( this.className ) { - // store className if set - jQuery._data( this, "__className__", this.className ); - } - - // If the element has a class name or if we're passed "false", - // then remove the whole classname (if there was one, the above saved it). - // Otherwise bring back whatever was previously saved (if anything), - // falling back to the empty string if nothing was stored. - this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; - } - }); - }, - - hasClass: function( selector ) { - var className = " " + selector + " ", - i = 0, - l = this.length; - for ( ; i < l; i++ ) { - if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) { - return true; - } - } - - return false; - }, - - val: function( value ) { - var ret, hooks, isFunction, - elem = this[0]; - - if ( !arguments.length ) { - if ( elem ) { - hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; - - if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { - return ret; - } - - ret = elem.value; - - return typeof ret === "string" ? - // handle most common string cases - ret.replace(rreturn, "") : - // handle cases where value is null/undef or number - ret == null ? "" : ret; - } - - return; - } - - isFunction = jQuery.isFunction( value ); - - return this.each(function( i ) { - var val; - - if ( this.nodeType !== 1 ) { - return; - } - - if ( isFunction ) { - val = value.call( this, i, jQuery( this ).val() ); - } else { - val = value; - } - - // Treat null/undefined as ""; convert numbers to string - if ( val == null ) { - val = ""; - } else if ( typeof val === "number" ) { - val += ""; - } else if ( jQuery.isArray( val ) ) { - val = jQuery.map(val, function ( value ) { - return value == null ? "" : value + ""; - }); - } - - hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; - - // If set returns undefined, fall back to normal setting - if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { - this.value = val; - } - }); - } -}); - -jQuery.extend({ - valHooks: { - option: { - get: function( elem ) { - // Use proper attribute retrieval(#6932, #12072) - var val = jQuery.find.attr( elem, "value" ); - return val != null ? - val : - elem.text; - } - }, - select: { - get: function( elem ) { - var value, option, - options = elem.options, - index = elem.selectedIndex, - one = elem.type === "select-one" || index < 0, - values = one ? null : [], - max = one ? index + 1 : options.length, - i = index < 0 ? - max : - one ? index : 0; - - // Loop through all the selected options - for ( ; i < max; i++ ) { - option = options[ i ]; - - // oldIE doesn't update selected after form reset (#2551) - if ( ( option.selected || i === index ) && - // Don't return options that are disabled or in a disabled optgroup - ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) && - ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) { - - // Get the specific value for the option - value = jQuery( option ).val(); - - // We don't need an array for one selects - if ( one ) { - return value; - } - - // Multi-Selects return an array - values.push( value ); - } - } - - return values; - }, - - set: function( elem, value ) { - var optionSet, option, - options = elem.options, - values = jQuery.makeArray( value ), - i = options.length; - - while ( i-- ) { - option = options[ i ]; - if ( (option.selected = jQuery.inArray( jQuery(option).val(), values ) >= 0) ) { - optionSet = true; - } - } - - // force browsers to behave consistently when non-matching value is set - if ( !optionSet ) { - elem.selectedIndex = -1; - } - return values; - } - } - }, - - attr: function( elem, name, value ) { - var hooks, ret, - nType = elem.nodeType; - - // don't get/set attributes on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - // Fallback to prop when attributes are not supported - if ( typeof elem.getAttribute === core_strundefined ) { - return jQuery.prop( elem, name, value ); - } - - // All attributes are lowercase - // Grab necessary hook if one is defined - if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { - name = name.toLowerCase(); - hooks = jQuery.attrHooks[ name ] || - ( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook ); - } - - if ( value !== undefined ) { - - if ( value === null ) { - jQuery.removeAttr( elem, name ); - - } else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { - return ret; - - } else { - elem.setAttribute( name, value + "" ); - return value; - } - - } else if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { - return ret; - - } else { - ret = jQuery.find.attr( elem, name ); - - // Non-existent attributes return null, we normalize to undefined - return ret == null ? - undefined : - ret; - } - }, - - removeAttr: function( elem, value ) { - var name, propName, - i = 0, - attrNames = value && value.match( core_rnotwhite ); - - if ( attrNames && elem.nodeType === 1 ) { - while ( (name = attrNames[i++]) ) { - propName = jQuery.propFix[ name ] || name; - - // Boolean attributes get special treatment (#10870) - if ( jQuery.expr.match.bool.test( name ) ) { - // Set corresponding property to false - if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) { - elem[ propName ] = false; - // Support: IE<9 - // Also clear defaultChecked/defaultSelected (if appropriate) - } else { - elem[ jQuery.camelCase( "default-" + name ) ] = - elem[ propName ] = false; - } - - // See #9699 for explanation of this approach (setting first, then removal) - } else { - jQuery.attr( elem, name, "" ); - } - - elem.removeAttribute( getSetAttribute ? name : propName ); - } - } - }, - - attrHooks: { - type: { - set: function( elem, value ) { - if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { - // Setting the type on a radio button after the value resets the value in IE6-9 - // Reset value to default in case type is set after value during creation - var val = elem.value; - elem.setAttribute( "type", value ); - if ( val ) { - elem.value = val; - } - return value; - } - } - } - }, - - propFix: { - "for": "htmlFor", - "class": "className" - }, - - prop: function( elem, name, value ) { - var ret, hooks, notxml, - nType = elem.nodeType; - - // don't get/set properties on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); - - if ( notxml ) { - // Fix name and attach hooks - name = jQuery.propFix[ name ] || name; - hooks = jQuery.propHooks[ name ]; - } - - if ( value !== undefined ) { - return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ? - ret : - ( elem[ name ] = value ); - - } else { - return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ? - ret : - elem[ name ]; - } - }, - - propHooks: { - tabIndex: { - get: function( elem ) { - // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set - // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ - // Use proper attribute retrieval(#12072) - var tabindex = jQuery.find.attr( elem, "tabindex" ); - - return tabindex ? - parseInt( tabindex, 10 ) : - rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? - 0 : - -1; - } - } - } -}); - -// Hooks for boolean attributes -boolHook = { - set: function( elem, value, name ) { - if ( value === false ) { - // Remove boolean attributes when set to false - jQuery.removeAttr( elem, name ); - } else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) { - // IE<8 needs the *property* name - elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name ); - - // Use defaultChecked and defaultSelected for oldIE - } else { - elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true; - } - - return name; - } -}; -jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) { - var getter = jQuery.expr.attrHandle[ name ] || jQuery.find.attr; - - jQuery.expr.attrHandle[ name ] = getSetInput && getSetAttribute || !ruseDefault.test( name ) ? - function( elem, name, isXML ) { - var fn = jQuery.expr.attrHandle[ name ], - ret = isXML ? - undefined : - /* jshint eqeqeq: false */ - (jQuery.expr.attrHandle[ name ] = undefined) != - getter( elem, name, isXML ) ? - - name.toLowerCase() : - null; - jQuery.expr.attrHandle[ name ] = fn; - return ret; - } : - function( elem, name, isXML ) { - return isXML ? - undefined : - elem[ jQuery.camelCase( "default-" + name ) ] ? - name.toLowerCase() : - null; - }; -}); - -// fix oldIE attroperties -if ( !getSetInput || !getSetAttribute ) { - jQuery.attrHooks.value = { - set: function( elem, value, name ) { - if ( jQuery.nodeName( elem, "input" ) ) { - // Does not return so that setAttribute is also used - elem.defaultValue = value; - } else { - // Use nodeHook if defined (#1954); otherwise setAttribute is fine - return nodeHook && nodeHook.set( elem, value, name ); - } - } - }; -} - -// IE6/7 do not support getting/setting some attributes with get/setAttribute -if ( !getSetAttribute ) { - - // Use this for any attribute in IE6/7 - // This fixes almost every IE6/7 issue - nodeHook = { - set: function( elem, value, name ) { - // Set the existing or create a new attribute node - var ret = elem.getAttributeNode( name ); - if ( !ret ) { - elem.setAttributeNode( - (ret = elem.ownerDocument.createAttribute( name )) - ); - } - - ret.value = value += ""; - - // Break association with cloned elements by also using setAttribute (#9646) - return name === "value" || value === elem.getAttribute( name ) ? - value : - undefined; - } - }; - jQuery.expr.attrHandle.id = jQuery.expr.attrHandle.name = jQuery.expr.attrHandle.coords = - // Some attributes are constructed with empty-string values when not defined - function( elem, name, isXML ) { - var ret; - return isXML ? - undefined : - (ret = elem.getAttributeNode( name )) && ret.value !== "" ? - ret.value : - null; - }; - jQuery.valHooks.button = { - get: function( elem, name ) { - var ret = elem.getAttributeNode( name ); - return ret && ret.specified ? - ret.value : - undefined; - }, - set: nodeHook.set - }; - - // Set contenteditable to false on removals(#10429) - // Setting to empty string throws an error as an invalid value - jQuery.attrHooks.contenteditable = { - set: function( elem, value, name ) { - nodeHook.set( elem, value === "" ? false : value, name ); - } - }; - - // Set width and height to auto instead of 0 on empty string( Bug #8150 ) - // This is for removals - jQuery.each([ "width", "height" ], function( i, name ) { - jQuery.attrHooks[ name ] = { - set: function( elem, value ) { - if ( value === "" ) { - elem.setAttribute( name, "auto" ); - return value; - } - } - }; - }); -} - - -// Some attributes require a special call on IE -// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx -if ( !jQuery.support.hrefNormalized ) { - // href/src property should get the full normalized URL (#10299/#12915) - jQuery.each([ "href", "src" ], function( i, name ) { - jQuery.propHooks[ name ] = { - get: function( elem ) { - return elem.getAttribute( name, 4 ); - } - }; - }); -} - -if ( !jQuery.support.style ) { - jQuery.attrHooks.style = { - get: function( elem ) { - // Return undefined in the case of empty string - // Note: IE uppercases css property names, but if we were to .toLowerCase() - // .cssText, that would destroy case senstitivity in URL's, like in "background" - return elem.style.cssText || undefined; - }, - set: function( elem, value ) { - return ( elem.style.cssText = value + "" ); - } - }; -} - -// Safari mis-reports the default selected property of an option -// Accessing the parent's selectedIndex property fixes it -if ( !jQuery.support.optSelected ) { - jQuery.propHooks.selected = { - get: function( elem ) { - var parent = elem.parentNode; - - if ( parent ) { - parent.selectedIndex; - - // Make sure that it also works with optgroups, see #5701 - if ( parent.parentNode ) { - parent.parentNode.selectedIndex; - } - } - return null; - } - }; -} - -jQuery.each([ - "tabIndex", - "readOnly", - "maxLength", - "cellSpacing", - "cellPadding", - "rowSpan", - "colSpan", - "useMap", - "frameBorder", - "contentEditable" -], function() { - jQuery.propFix[ this.toLowerCase() ] = this; -}); - -// IE6/7 call enctype encoding -if ( !jQuery.support.enctype ) { - jQuery.propFix.enctype = "encoding"; -} - -// Radios and checkboxes getter/setter -jQuery.each([ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = { - set: function( elem, value ) { - if ( jQuery.isArray( value ) ) { - return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); - } - } - }; - if ( !jQuery.support.checkOn ) { - jQuery.valHooks[ this ].get = function( elem ) { - // Support: Webkit - // "" is returned instead of "on" if a value isn't specified - return elem.getAttribute("value") === null ? "on" : elem.value; - }; - } -}); -var rformElems = /^(?:input|select|textarea)$/i, - rkeyEvent = /^key/, - rmouseEvent = /^(?:mouse|contextmenu)|click/, - rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, - rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; - -function returnTrue() { - return true; -} - -function returnFalse() { - return false; -} - -function safeActiveElement() { - try { - return document.activeElement; - } catch ( err ) { } -} - -/* - * Helper functions for managing events -- not part of the public interface. - * Props to Dean Edwards' addEvent library for many of the ideas. - */ -jQuery.event = { - - global: {}, - - add: function( elem, types, handler, data, selector ) { - var tmp, events, t, handleObjIn, - special, eventHandle, handleObj, - handlers, type, namespaces, origType, - elemData = jQuery._data( elem ); - - // Don't attach events to noData or text/comment nodes (but allow plain objects) - if ( !elemData ) { - return; - } - - // Caller can pass in an object of custom data in lieu of the handler - if ( handler.handler ) { - handleObjIn = handler; - handler = handleObjIn.handler; - selector = handleObjIn.selector; - } - - // Make sure that the handler has a unique ID, used to find/remove it later - if ( !handler.guid ) { - handler.guid = jQuery.guid++; - } - - // Init the element's event structure and main handler, if this is the first - if ( !(events = elemData.events) ) { - events = elemData.events = {}; - } - if ( !(eventHandle = elemData.handle) ) { - eventHandle = elemData.handle = function( e ) { - // Discard the second event of a jQuery.event.trigger() and - // when an event is called after a page has unloaded - return typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ? - jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : - undefined; - }; - // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events - eventHandle.elem = elem; - } - - // Handle multiple events separated by a space - types = ( types || "" ).match( core_rnotwhite ) || [""]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[t] ) || []; - type = origType = tmp[1]; - namespaces = ( tmp[2] || "" ).split( "." ).sort(); - - // There *must* be a type, no attaching namespace-only handlers - if ( !type ) { - continue; - } - - // If event changes its type, use the special event handlers for the changed type - special = jQuery.event.special[ type ] || {}; - - // If selector defined, determine special event api type, otherwise given type - type = ( selector ? special.delegateType : special.bindType ) || type; - - // Update special based on newly reset type - special = jQuery.event.special[ type ] || {}; - - // handleObj is passed to all event handlers - handleObj = jQuery.extend({ - type: type, - origType: origType, - data: data, - handler: handler, - guid: handler.guid, - selector: selector, - needsContext: selector && jQuery.expr.match.needsContext.test( selector ), - namespace: namespaces.join(".") - }, handleObjIn ); - - // Init the event handler queue if we're the first - if ( !(handlers = events[ type ]) ) { - handlers = events[ type ] = []; - handlers.delegateCount = 0; - - // Only use addEventListener/attachEvent if the special events handler returns false - if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - // Bind the global event handler to the element - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle, false ); - - } else if ( elem.attachEvent ) { - elem.attachEvent( "on" + type, eventHandle ); - } - } - } - - if ( special.add ) { - special.add.call( elem, handleObj ); - - if ( !handleObj.handler.guid ) { - handleObj.handler.guid = handler.guid; - } - } - - // Add to the element's handler list, delegates in front - if ( selector ) { - handlers.splice( handlers.delegateCount++, 0, handleObj ); - } else { - handlers.push( handleObj ); - } - - // Keep track of which events have ever been used, for event optimization - jQuery.event.global[ type ] = true; - } - - // Nullify elem to prevent memory leaks in IE - elem = null; - }, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, selector, mappedTypes ) { - var j, handleObj, tmp, - origCount, t, events, - special, handlers, type, - namespaces, origType, - elemData = jQuery.hasData( elem ) && jQuery._data( elem ); - - if ( !elemData || !(events = elemData.events) ) { - return; - } - - // Once for each type.namespace in types; type may be omitted - types = ( types || "" ).match( core_rnotwhite ) || [""]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[t] ) || []; - type = origType = tmp[1]; - namespaces = ( tmp[2] || "" ).split( "." ).sort(); - - // Unbind all events (on this namespace, if provided) for the element - if ( !type ) { - for ( type in events ) { - jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); - } - continue; - } - - special = jQuery.event.special[ type ] || {}; - type = ( selector ? special.delegateType : special.bindType ) || type; - handlers = events[ type ] || []; - tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ); - - // Remove matching events - origCount = j = handlers.length; - while ( j-- ) { - handleObj = handlers[ j ]; - - if ( ( mappedTypes || origType === handleObj.origType ) && - ( !handler || handler.guid === handleObj.guid ) && - ( !tmp || tmp.test( handleObj.namespace ) ) && - ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { - handlers.splice( j, 1 ); - - if ( handleObj.selector ) { - handlers.delegateCount--; - } - if ( special.remove ) { - special.remove.call( elem, handleObj ); - } - } - } - - // Remove generic event handler if we removed something and no more handlers exist - // (avoids potential for endless recursion during removal of special event handlers) - if ( origCount && !handlers.length ) { - if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { - jQuery.removeEvent( elem, type, elemData.handle ); - } - - delete events[ type ]; - } - } - - // Remove the expando if it's no longer used - if ( jQuery.isEmptyObject( events ) ) { - delete elemData.handle; - - // removeData also checks for emptiness and clears the expando if empty - // so use it instead of delete - jQuery._removeData( elem, "events" ); - } - }, - - trigger: function( event, data, elem, onlyHandlers ) { - var handle, ontype, cur, - bubbleType, special, tmp, i, - eventPath = [ elem || document ], - type = core_hasOwn.call( event, "type" ) ? event.type : event, - namespaces = core_hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : []; - - cur = tmp = elem = elem || document; - - // Don't do events on text and comment nodes - if ( elem.nodeType === 3 || elem.nodeType === 8 ) { - return; - } - - // focus/blur morphs to focusin/out; ensure we're not firing them right now - if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { - return; - } - - if ( type.indexOf(".") >= 0 ) { - // Namespaced trigger; create a regexp to match event type in handle() - namespaces = type.split("."); - type = namespaces.shift(); - namespaces.sort(); - } - ontype = type.indexOf(":") < 0 && "on" + type; - - // Caller can pass in a jQuery.Event object, Object, or just an event type string - event = event[ jQuery.expando ] ? - event : - new jQuery.Event( type, typeof event === "object" && event ); - - // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) - event.isTrigger = onlyHandlers ? 2 : 3; - event.namespace = namespaces.join("."); - event.namespace_re = event.namespace ? - new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) : - null; - - // Clean up the event in case it is being reused - event.result = undefined; - if ( !event.target ) { - event.target = elem; - } - - // Clone any incoming data and prepend the event, creating the handler arg list - data = data == null ? - [ event ] : - jQuery.makeArray( data, [ event ] ); - - // Allow special events to draw outside the lines - special = jQuery.event.special[ type ] || {}; - if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { - return; - } - - // Determine event propagation path in advance, per W3C events spec (#9951) - // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) - if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { - - bubbleType = special.delegateType || type; - if ( !rfocusMorph.test( bubbleType + type ) ) { - cur = cur.parentNode; - } - for ( ; cur; cur = cur.parentNode ) { - eventPath.push( cur ); - tmp = cur; - } - - // Only add window if we got to document (e.g., not plain obj or detached DOM) - if ( tmp === (elem.ownerDocument || document) ) { - eventPath.push( tmp.defaultView || tmp.parentWindow || window ); - } - } - - // Fire handlers on the event path - i = 0; - while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) { - - event.type = i > 1 ? - bubbleType : - special.bindType || type; - - // jQuery handler - handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); - if ( handle ) { - handle.apply( cur, data ); - } - - // Native handler - handle = ontype && cur[ ontype ]; - if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) { - event.preventDefault(); - } - } - event.type = type; - - // If nobody prevented the default action, do it now - if ( !onlyHandlers && !event.isDefaultPrevented() ) { - - if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) && - jQuery.acceptData( elem ) ) { - - // Call a native DOM method on the target with the same name name as the event. - // Can't use an .isFunction() check here because IE6/7 fails that test. - // Don't do default actions on window, that's where global variables be (#6170) - if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) { - - // Don't re-trigger an onFOO event when we call its FOO() method - tmp = elem[ ontype ]; - - if ( tmp ) { - elem[ ontype ] = null; - } - - // Prevent re-triggering of the same event, since we already bubbled it above - jQuery.event.triggered = type; - try { - elem[ type ](); - } catch ( e ) { - // IE<9 dies on focus/blur to hidden element (#1486,#12518) - // only reproducible on winXP IE8 native, not IE9 in IE8 mode - } - jQuery.event.triggered = undefined; - - if ( tmp ) { - elem[ ontype ] = tmp; - } - } - } - } - - return event.result; - }, - - dispatch: function( event ) { - - // Make a writable jQuery.Event from the native event object - event = jQuery.event.fix( event ); - - var i, ret, handleObj, matched, j, - handlerQueue = [], - args = core_slice.call( arguments ), - handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [], - special = jQuery.event.special[ event.type ] || {}; - - // Use the fix-ed jQuery.Event rather than the (read-only) native event - args[0] = event; - event.delegateTarget = this; - - // Call the preDispatch hook for the mapped type, and let it bail if desired - if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { - return; - } - - // Determine handlers - handlerQueue = jQuery.event.handlers.call( this, event, handlers ); - - // Run delegates first; they may want to stop propagation beneath us - i = 0; - while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) { - event.currentTarget = matched.elem; - - j = 0; - while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) { - - // Triggered event must either 1) have no namespace, or - // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). - if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) { - - event.handleObj = handleObj; - event.data = handleObj.data; - - ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) - .apply( matched.elem, args ); - - if ( ret !== undefined ) { - if ( (event.result = ret) === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - } - } - } - - // Call the postDispatch hook for the mapped type - if ( special.postDispatch ) { - special.postDispatch.call( this, event ); - } - - return event.result; - }, - - handlers: function( event, handlers ) { - var sel, handleObj, matches, i, - handlerQueue = [], - delegateCount = handlers.delegateCount, - cur = event.target; - - // Find delegate handlers - // Black-hole SVG instance trees (#13180) - // Avoid non-left-click bubbling in Firefox (#3861) - if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) { - - /* jshint eqeqeq: false */ - for ( ; cur != this; cur = cur.parentNode || this ) { - /* jshint eqeqeq: true */ - - // Don't check non-elements (#13208) - // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) - if ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click") ) { - matches = []; - for ( i = 0; i < delegateCount; i++ ) { - handleObj = handlers[ i ]; - - // Don't conflict with Object.prototype properties (#13203) - sel = handleObj.selector + " "; - - if ( matches[ sel ] === undefined ) { - matches[ sel ] = handleObj.needsContext ? - jQuery( sel, this ).index( cur ) >= 0 : - jQuery.find( sel, this, null, [ cur ] ).length; - } - if ( matches[ sel ] ) { - matches.push( handleObj ); - } - } - if ( matches.length ) { - handlerQueue.push({ elem: cur, handlers: matches }); - } - } - } - } - - // Add the remaining (directly-bound) handlers - if ( delegateCount < handlers.length ) { - handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) }); - } - - return handlerQueue; - }, - - fix: function( event ) { - if ( event[ jQuery.expando ] ) { - return event; - } - - // Create a writable copy of the event object and normalize some properties - var i, prop, copy, - type = event.type, - originalEvent = event, - fixHook = this.fixHooks[ type ]; - - if ( !fixHook ) { - this.fixHooks[ type ] = fixHook = - rmouseEvent.test( type ) ? this.mouseHooks : - rkeyEvent.test( type ) ? this.keyHooks : - {}; - } - copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; - - event = new jQuery.Event( originalEvent ); - - i = copy.length; - while ( i-- ) { - prop = copy[ i ]; - event[ prop ] = originalEvent[ prop ]; - } - - // Support: IE<9 - // Fix target property (#1925) - if ( !event.target ) { - event.target = originalEvent.srcElement || document; - } - - // Support: Chrome 23+, Safari? - // Target should not be a text node (#504, #13143) - if ( event.target.nodeType === 3 ) { - event.target = event.target.parentNode; - } - - // Support: IE<9 - // For mouse/key events, metaKey==false if it's undefined (#3368, #11328) - event.metaKey = !!event.metaKey; - - return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; - }, - - // Includes some event props shared by KeyEvent and MouseEvent - 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( event, original ) { - - // Add which for key events - if ( event.which == null ) { - event.which = original.charCode != null ? original.charCode : original.keyCode; - } - - return event; - } - }, - - mouseHooks: { - props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), - filter: function( event, original ) { - var body, eventDoc, doc, - button = original.button, - fromElement = original.fromElement; - - // Calculate pageX/Y if missing and clientX/Y available - if ( event.pageX == null && original.clientX != null ) { - eventDoc = event.target.ownerDocument || document; - doc = eventDoc.documentElement; - body = eventDoc.body; - - event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); - event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); - } - - // Add relatedTarget, if necessary - if ( !event.relatedTarget && fromElement ) { - event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - // Note: button is not normalized, so don't use it - if ( !event.which && button !== undefined ) { - event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); - } - - return event; - } - }, - - special: { - load: { - // Prevent triggered image.load events from bubbling to window.load - noBubble: true - }, - focus: { - // Fire native event if possible so blur/focus sequence is correct - trigger: function() { - if ( this !== safeActiveElement() && this.focus ) { - try { - this.focus(); - return false; - } catch ( e ) { - // Support: IE<9 - // If we error on focus to hidden element (#1486, #12518), - // let .trigger() run the handlers - } - } - }, - delegateType: "focusin" - }, - blur: { - trigger: function() { - if ( this === safeActiveElement() && this.blur ) { - this.blur(); - return false; - } - }, - delegateType: "focusout" - }, - click: { - // For checkbox, fire native event so checked state will be right - trigger: function() { - if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) { - this.click(); - return false; - } - }, - - // For cross-browser consistency, don't fire native .click() on links - _default: function( event ) { - return jQuery.nodeName( event.target, "a" ); - } - }, - - beforeunload: { - postDispatch: function( event ) { - - // Even when returnValue equals to undefined Firefox will still show alert - if ( event.result !== undefined ) { - event.originalEvent.returnValue = event.result; - } - } - } - }, - - simulate: function( type, elem, event, bubble ) { - // Piggyback on a donor event to simulate a different one. - // Fake originalEvent to avoid donor's stopPropagation, but if the - // simulated event prevents default then we do the same on the donor. - var e = jQuery.extend( - new jQuery.Event(), - event, - { - type: type, - isSimulated: true, - originalEvent: {} - } - ); - if ( bubble ) { - jQuery.event.trigger( e, null, elem ); - } else { - jQuery.event.dispatch.call( elem, e ); - } - if ( e.isDefaultPrevented() ) { - event.preventDefault(); - } - } -}; - -jQuery.removeEvent = document.removeEventListener ? - function( elem, type, handle ) { - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle, false ); - } - } : - function( elem, type, handle ) { - var name = "on" + type; - - if ( elem.detachEvent ) { - - // #8545, #7054, preventing memory leaks for custom events in IE6-8 - // detachEvent needed property on element, by name of that event, to properly expose it to GC - if ( typeof elem[ name ] === core_strundefined ) { - elem[ name ] = null; - } - - elem.detachEvent( name, handle ); - } - }; - -jQuery.Event = function( src, props ) { - // Allow instantiation without the 'new' keyword - if ( !(this instanceof jQuery.Event) ) { - return new jQuery.Event( src, props ); - } - - // Event object - if ( src && src.type ) { - this.originalEvent = src; - this.type = src.type; - - // Events bubbling up the document may have been marked as prevented - // by a handler lower down the tree; reflect the correct value. - this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || - src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; - - // Event type - } else { - this.type = src; - } - - // Put explicitly provided properties onto the event object - if ( props ) { - jQuery.extend( this, props ); - } - - // Create a timestamp if incoming event doesn't have one - this.timeStamp = src && src.timeStamp || jQuery.now(); - - // Mark it as fixed - this[ jQuery.expando ] = true; -}; - -// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html -jQuery.Event.prototype = { - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse, - - preventDefault: function() { - var e = this.originalEvent; - - this.isDefaultPrevented = returnTrue; - if ( !e ) { - return; - } - - // If preventDefault exists, run it on the original event - if ( e.preventDefault ) { - e.preventDefault(); - - // Support: IE - // Otherwise set the returnValue property of the original event to false - } else { - e.returnValue = false; - } - }, - stopPropagation: function() { - var e = this.originalEvent; - - this.isPropagationStopped = returnTrue; - if ( !e ) { - return; - } - // If stopPropagation exists, run it on the original event - if ( e.stopPropagation ) { - e.stopPropagation(); - } - - // Support: IE - // Set the cancelBubble property of the original event to true - e.cancelBubble = true; - }, - stopImmediatePropagation: function() { - this.isImmediatePropagationStopped = returnTrue; - this.stopPropagation(); - } -}; - -// Create mouseenter/leave events using mouseover/out and event-time checks -jQuery.each({ - mouseenter: "mouseover", - mouseleave: "mouseout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - delegateType: fix, - bindType: fix, - - handle: function( event ) { - var ret, - target = this, - related = event.relatedTarget, - handleObj = event.handleObj; - - // For mousenter/leave call the handler if related is outside the target. - // NB: No relatedTarget if the mouse left/entered the browser window - if ( !related || (related !== target && !jQuery.contains( target, related )) ) { - event.type = handleObj.origType; - ret = handleObj.handler.apply( this, arguments ); - event.type = fix; - } - return ret; - } - }; -}); - -// IE submit delegation -if ( !jQuery.support.submitBubbles ) { - - jQuery.event.special.submit = { - setup: function() { - // Only need this for delegated form submit events - if ( jQuery.nodeName( this, "form" ) ) { - return false; - } - - // Lazy-add a submit handler when a descendant form may potentially be submitted - jQuery.event.add( this, "click._submit keypress._submit", function( e ) { - // Node name check avoids a VML-related crash in IE (#9807) - var elem = e.target, - form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; - if ( form && !jQuery._data( form, "submitBubbles" ) ) { - jQuery.event.add( form, "submit._submit", function( event ) { - event._submit_bubble = true; - }); - jQuery._data( form, "submitBubbles", true ); - } - }); - // return undefined since we don't need an event listener - }, - - postDispatch: function( event ) { - // If form was submitted by the user, bubble the event up the tree - if ( event._submit_bubble ) { - delete event._submit_bubble; - if ( this.parentNode && !event.isTrigger ) { - jQuery.event.simulate( "submit", this.parentNode, event, true ); - } - } - }, - - teardown: function() { - // Only need this for delegated form submit events - if ( jQuery.nodeName( this, "form" ) ) { - return false; - } - - // Remove delegated handlers; cleanData eventually reaps submit handlers attached above - jQuery.event.remove( this, "._submit" ); - } - }; -} - -// IE change delegation and checkbox/radio fix -if ( !jQuery.support.changeBubbles ) { - - jQuery.event.special.change = { - - setup: function() { - - if ( rformElems.test( this.nodeName ) ) { - // IE doesn't fire change on a check/radio until blur; trigger it on click - // after a propertychange. Eat the blur-change in special.change.handle. - // This still fires onchange a second time for check/radio after blur. - if ( this.type === "checkbox" || this.type === "radio" ) { - jQuery.event.add( this, "propertychange._change", function( event ) { - if ( event.originalEvent.propertyName === "checked" ) { - this._just_changed = true; - } - }); - jQuery.event.add( this, "click._change", function( event ) { - if ( this._just_changed && !event.isTrigger ) { - this._just_changed = false; - } - // Allow triggered, simulated change events (#11500) - jQuery.event.simulate( "change", this, event, true ); - }); - } - return false; - } - // Delegated event; lazy-add a change handler on descendant inputs - jQuery.event.add( this, "beforeactivate._change", function( e ) { - var elem = e.target; - - if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) { - jQuery.event.add( elem, "change._change", function( event ) { - if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { - jQuery.event.simulate( "change", this.parentNode, event, true ); - } - }); - jQuery._data( elem, "changeBubbles", true ); - } - }); - }, - - handle: function( event ) { - var elem = event.target; - - // Swallow native change events from checkbox/radio, we already triggered them above - if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { - return event.handleObj.handler.apply( this, arguments ); - } - }, - - teardown: function() { - jQuery.event.remove( this, "._change" ); - - return !rformElems.test( this.nodeName ); - } - }; -} - -// Create "bubbling" focus and blur events -if ( !jQuery.support.focusinBubbles ) { - jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { - - // Attach a single capturing handler while someone wants focusin/focusout - var attaches = 0, - handler = function( event ) { - jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); - }; - - jQuery.event.special[ fix ] = { - setup: function() { - if ( attaches++ === 0 ) { - document.addEventListener( orig, handler, true ); - } - }, - teardown: function() { - if ( --attaches === 0 ) { - document.removeEventListener( orig, handler, true ); - } - } - }; - }); -} - -jQuery.fn.extend({ - - on: function( types, selector, data, fn, /*INTERNAL*/ one ) { - var type, origFn; - - // Types can be a map of types/handlers - if ( typeof types === "object" ) { - // ( types-Object, selector, data ) - if ( typeof selector !== "string" ) { - // ( types-Object, data ) - data = data || selector; - selector = undefined; - } - for ( type in types ) { - this.on( type, selector, data, types[ type ], one ); - } - return this; - } - - if ( data == null && fn == null ) { - // ( types, fn ) - fn = selector; - data = selector = undefined; - } else if ( fn == null ) { - if ( typeof selector === "string" ) { - // ( types, selector, fn ) - fn = data; - data = undefined; - } else { - // ( types, data, fn ) - fn = data; - data = selector; - selector = undefined; - } - } - if ( fn === false ) { - fn = returnFalse; - } else if ( !fn ) { - return this; - } - - if ( one === 1 ) { - origFn = fn; - fn = function( event ) { - // Can use an empty set, since event contains the info - jQuery().off( event ); - return origFn.apply( this, arguments ); - }; - // Use same guid so caller can remove using origFn - fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); - } - return this.each( function() { - jQuery.event.add( this, types, fn, data, selector ); - }); - }, - one: function( types, selector, data, fn ) { - return this.on( types, selector, data, fn, 1 ); - }, - off: function( types, selector, fn ) { - var handleObj, type; - if ( types && types.preventDefault && types.handleObj ) { - // ( event ) dispatched jQuery.Event - handleObj = types.handleObj; - jQuery( types.delegateTarget ).off( - handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, - handleObj.selector, - handleObj.handler - ); - return this; - } - if ( typeof types === "object" ) { - // ( types-object [, selector] ) - for ( type in types ) { - this.off( type, selector, types[ type ] ); - } - return this; - } - if ( selector === false || typeof selector === "function" ) { - // ( types [, fn] ) - fn = selector; - selector = undefined; - } - if ( fn === false ) { - fn = returnFalse; - } - return this.each(function() { - jQuery.event.remove( this, types, fn, selector ); - }); - }, - - trigger: function( type, data ) { - return this.each(function() { - jQuery.event.trigger( type, data, this ); - }); - }, - triggerHandler: function( type, data ) { - var elem = this[0]; - if ( elem ) { - return jQuery.event.trigger( type, data, elem, true ); - } - } -}); -var isSimple = /^.[^:#\[\.,]*$/, - rparentsprev = /^(?:parents|prev(?:Until|All))/, - rneedsContext = jQuery.expr.match.needsContext, - // methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.fn.extend({ - find: function( selector ) { - var i, - ret = [], - self = this, - len = self.length; - - if ( typeof selector !== "string" ) { - return this.pushStack( jQuery( selector ).filter(function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( self[ i ], this ) ) { - return true; - } - } - }) ); - } - - for ( i = 0; i < len; i++ ) { - jQuery.find( selector, self[ i ], ret ); - } - - // Needed because $( selector, context ) becomes $( context ).find( selector ) - ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); - ret.selector = this.selector ? this.selector + " " + selector : selector; - return ret; - }, - - has: function( target ) { - var i, - targets = jQuery( target, this ), - len = targets.length; - - return this.filter(function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( this, targets[i] ) ) { - return true; - } - } - }); - }, - - not: function( selector ) { - return this.pushStack( winnow(this, selector || [], true) ); - }, - - filter: function( selector ) { - return this.pushStack( winnow(this, selector || [], false) ); - }, - - is: function( selector ) { - return !!winnow( - this, - - // If this is a positional/relative selector, check membership in the returned set - // so $("p:first").is("p:last") won't return true for a doc with two "p". - typeof selector === "string" && rneedsContext.test( selector ) ? - jQuery( selector ) : - selector || [], - false - ).length; - }, - - closest: function( selectors, context ) { - var cur, - i = 0, - l = this.length, - ret = [], - pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? - jQuery( selectors, context || this.context ) : - 0; - - for ( ; i < l; i++ ) { - for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) { - // Always skip document fragments - if ( cur.nodeType < 11 && (pos ? - pos.index(cur) > -1 : - - // Don't pass non-elements to Sizzle - cur.nodeType === 1 && - jQuery.find.matchesSelector(cur, selectors)) ) { - - cur = ret.push( cur ); - break; - } - } - } - - return this.pushStack( ret.length > 1 ? jQuery.unique( ret ) : ret ); - }, - - // Determine the position of an element within - // the matched set of elements - index: function( elem ) { - - // No argument, return index in parent - if ( !elem ) { - return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1; - } - - // index in selector - if ( typeof elem === "string" ) { - return jQuery.inArray( this[0], jQuery( elem ) ); - } - - // Locate the position of the desired element - return jQuery.inArray( - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[0] : elem, this ); - }, - - add: function( selector, context ) { - var set = typeof selector === "string" ? - jQuery( selector, context ) : - jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), - all = jQuery.merge( this.get(), set ); - - return this.pushStack( jQuery.unique(all) ); - }, - - addBack: function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter(selector) - ); - } -}); - -function sibling( cur, dir ) { - do { - cur = cur[ dir ]; - } while ( cur && cur.nodeType !== 1 ); - - return cur; -} - -jQuery.each({ - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return jQuery.dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, i, until ) { - return jQuery.dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return sibling( elem, "nextSibling" ); - }, - prev: function( elem ) { - return sibling( elem, "previousSibling" ); - }, - nextAll: function( elem ) { - return jQuery.dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return jQuery.dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, i, until ) { - return jQuery.dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, i, until ) { - return jQuery.dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); - }, - children: function( elem ) { - return jQuery.sibling( elem.firstChild ); - }, - contents: function( elem ) { - return jQuery.nodeName( elem, "iframe" ) ? - elem.contentDocument || elem.contentWindow.document : - jQuery.merge( [], elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var ret = jQuery.map( this, fn, until ); - - if ( name.slice( -5 ) !== "Until" ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - ret = jQuery.filter( selector, ret ); - } - - if ( this.length > 1 ) { - // Remove duplicates - if ( !guaranteedUnique[ name ] ) { - ret = jQuery.unique( ret ); - } - - // Reverse order for parents* and prev-derivatives - if ( rparentsprev.test( name ) ) { - ret = ret.reverse(); - } - } - - return this.pushStack( ret ); - }; -}); - -jQuery.extend({ - filter: function( expr, elems, not ) { - var elem = elems[ 0 ]; - - if ( not ) { - expr = ":not(" + expr + ")"; - } - - return elems.length === 1 && elem.nodeType === 1 ? - jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] : - jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { - return elem.nodeType === 1; - })); - }, - - dir: function( elem, dir, until ) { - var matched = [], - cur = elem[ dir ]; - - while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { - if ( cur.nodeType === 1 ) { - matched.push( cur ); - } - cur = cur[dir]; - } - return matched; - }, - - sibling: function( n, elem ) { - var r = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - r.push( n ); - } - } - - return r; - } -}); - -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, not ) { - if ( jQuery.isFunction( qualifier ) ) { - return jQuery.grep( elements, function( elem, i ) { - /* jshint -W018 */ - return !!qualifier.call( elem, i, elem ) !== not; - }); - - } - - if ( qualifier.nodeType ) { - return jQuery.grep( elements, function( elem ) { - return ( elem === qualifier ) !== not; - }); - - } - - if ( typeof qualifier === "string" ) { - if ( isSimple.test( qualifier ) ) { - return jQuery.filter( qualifier, elements, not ); - } - - qualifier = jQuery.filter( qualifier, elements ); - } - - return jQuery.grep( elements, function( elem ) { - return ( jQuery.inArray( elem, qualifier ) >= 0 ) !== not; - }); -} -function createSafeFragment( document ) { - var list = nodeNames.split( "|" ), - safeFrag = document.createDocumentFragment(); - - if ( safeFrag.createElement ) { - while ( list.length ) { - safeFrag.createElement( - list.pop() - ); - } - } - return safeFrag; -} - -var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + - "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", - rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, - rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"), - rleadingWhitespace = /^\s+/, - rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, - rtagName = /<([\w:]+)/, - rtbody = /\s*$/g, - - // We have to close these tags to support XHTML (#13200) - wrapMap = { - option: [ 1, "" ], - legend: [ 1, "
    ", "
    " ], - area: [ 1, "", "" ], - param: [ 1, "", "" ], - thead: [ 1, "", "
    " ], - tr: [ 2, "", "
    " ], - col: [ 2, "", "
    " ], - td: [ 3, "", "
    " ], - - // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, - // unless wrapped in a div with non-breaking characters in front of it. - _default: jQuery.support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X
    ", "
    " ] - }, - safeFragment = createSafeFragment( document ), - fragmentDiv = safeFragment.appendChild( document.createElement("div") ); - -wrapMap.optgroup = wrapMap.option; -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - -jQuery.fn.extend({ - text: function( value ) { - return jQuery.access( this, function( value ) { - return value === undefined ? - jQuery.text( this ) : - this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) ); - }, null, value, arguments.length ); - }, - - append: function() { - return this.domManip( arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.appendChild( elem ); - } - }); - }, - - prepend: function() { - return this.domManip( arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.insertBefore( elem, target.firstChild ); - } - }); - }, - - before: function() { - return this.domManip( arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this ); - } - }); - }, - - after: function() { - return this.domManip( arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this.nextSibling ); - } - }); - }, - - // keepData is for internal use only--do not document - remove: function( selector, keepData ) { - var elem, - elems = selector ? jQuery.filter( selector, this ) : this, - i = 0; - - for ( ; (elem = elems[i]) != null; i++ ) { - - if ( !keepData && elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem ) ); - } - - if ( elem.parentNode ) { - if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) { - setGlobalEval( getAll( elem, "script" ) ); - } - elem.parentNode.removeChild( elem ); - } - } - - return this; - }, - - empty: function() { - var elem, - i = 0; - - for ( ; (elem = this[i]) != null; i++ ) { - // Remove element nodes and prevent memory leaks - if ( elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem, false ) ); - } - - // Remove any remaining nodes - while ( elem.firstChild ) { - elem.removeChild( elem.firstChild ); - } - - // If this is a select, ensure that it displays empty (#12336) - // Support: IE<9 - if ( elem.options && jQuery.nodeName( elem, "select" ) ) { - elem.options.length = 0; - } - } - - return this; - }, - - clone: function( dataAndEvents, deepDataAndEvents ) { - dataAndEvents = dataAndEvents == null ? false : dataAndEvents; - deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; - - return this.map( function () { - return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); - }); - }, - - html: function( value ) { - return jQuery.access( this, function( value ) { - var elem = this[0] || {}, - i = 0, - l = this.length; - - if ( value === undefined ) { - return elem.nodeType === 1 ? - elem.innerHTML.replace( rinlinejQuery, "" ) : - undefined; - } - - // See if we can take a shortcut and just use innerHTML - if ( typeof value === "string" && !rnoInnerhtml.test( value ) && - ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) && - ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) && - !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) { - - value = value.replace( rxhtmlTag, "<$1>" ); - - try { - for (; i < l; i++ ) { - // Remove element nodes and prevent memory leaks - elem = this[i] || {}; - if ( elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem, false ) ); - elem.innerHTML = value; - } - } - - elem = 0; - - // If using innerHTML throws an exception, use the fallback method - } catch(e) {} - } - - if ( elem ) { - this.empty().append( value ); - } - }, null, value, arguments.length ); - }, - - replaceWith: function() { - var - // Snapshot the DOM in case .domManip sweeps something relevant into its fragment - args = jQuery.map( this, function( elem ) { - return [ elem.nextSibling, elem.parentNode ]; - }), - i = 0; - - // Make the changes, replacing each context element with the new content - this.domManip( arguments, function( elem ) { - var next = args[ i++ ], - parent = args[ i++ ]; - - if ( parent ) { - // Don't use the snapshot next if it has moved (#13810) - if ( next && next.parentNode !== parent ) { - next = this.nextSibling; - } - jQuery( this ).remove(); - parent.insertBefore( elem, next ); - } - // Allow new content to include elements from the context set - }, true ); - - // Force removal if there was no new content (e.g., from empty arguments) - return i ? this : this.remove(); - }, - - detach: function( selector ) { - return this.remove( selector, true ); - }, - - domManip: function( args, callback, allowIntersection ) { - - // Flatten any nested arrays - args = core_concat.apply( [], args ); - - var first, node, hasScripts, - scripts, doc, fragment, - i = 0, - l = this.length, - set = this, - iNoClone = l - 1, - value = args[0], - isFunction = jQuery.isFunction( value ); - - // We can't cloneNode fragments that contain checked, in WebKit - if ( isFunction || !( l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test( value ) ) ) { - return this.each(function( index ) { - var self = set.eq( index ); - if ( isFunction ) { - args[0] = value.call( this, index, self.html() ); - } - self.domManip( args, callback, allowIntersection ); - }); - } - - if ( l ) { - fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, !allowIntersection && this ); - first = fragment.firstChild; - - if ( fragment.childNodes.length === 1 ) { - fragment = first; - } - - if ( first ) { - scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); - hasScripts = scripts.length; - - // Use the original fragment for the last item instead of the first because it can end up - // being emptied incorrectly in certain situations (#8070). - for ( ; i < l; i++ ) { - node = fragment; - - if ( i !== iNoClone ) { - node = jQuery.clone( node, true, true ); - - // Keep references to cloned scripts for later restoration - if ( hasScripts ) { - jQuery.merge( scripts, getAll( node, "script" ) ); - } - } - - callback.call( this[i], node, i ); - } - - if ( hasScripts ) { - doc = scripts[ scripts.length - 1 ].ownerDocument; - - // Reenable scripts - jQuery.map( scripts, restoreScript ); - - // Evaluate executable scripts on first document insertion - for ( i = 0; i < hasScripts; i++ ) { - node = scripts[ i ]; - if ( rscriptType.test( node.type || "" ) && - !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) { - - if ( node.src ) { - // Hope ajax is available... - jQuery._evalUrl( node.src ); - } else { - jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) ); - } - } - } - } - - // Fix #11809: Avoid leaking memory - fragment = first = null; - } - } - - return this; - } -}); - -// Support: IE<8 -// Manipulating tables requires a tbody -function manipulationTarget( elem, content ) { - return jQuery.nodeName( elem, "table" ) && - jQuery.nodeName( content.nodeType === 1 ? content : content.firstChild, "tr" ) ? - - elem.getElementsByTagName("tbody")[0] || - elem.appendChild( elem.ownerDocument.createElement("tbody") ) : - elem; -} - -// Replace/restore the type attribute of script elements for safe DOM manipulation -function disableScript( elem ) { - elem.type = (jQuery.find.attr( elem, "type" ) !== null) + "/" + elem.type; - return elem; -} -function restoreScript( elem ) { - var match = rscriptTypeMasked.exec( elem.type ); - if ( match ) { - elem.type = match[1]; - } else { - elem.removeAttribute("type"); - } - return elem; -} - -// Mark scripts as having already been evaluated -function setGlobalEval( elems, refElements ) { - var elem, - i = 0; - for ( ; (elem = elems[i]) != null; i++ ) { - jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) ); - } -} - -function cloneCopyEvent( src, dest ) { - - if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { - return; - } - - var type, i, l, - oldData = jQuery._data( src ), - curData = jQuery._data( dest, oldData ), - events = oldData.events; - - if ( events ) { - delete curData.handle; - curData.events = {}; - - for ( type in events ) { - for ( i = 0, l = events[ type ].length; i < l; i++ ) { - jQuery.event.add( dest, type, events[ type ][ i ] ); - } - } - } - - // make the cloned public data object a copy from the original - if ( curData.data ) { - curData.data = jQuery.extend( {}, curData.data ); - } -} - -function fixCloneNodeIssues( src, dest ) { - var nodeName, e, data; - - // We do not need to do anything for non-Elements - if ( dest.nodeType !== 1 ) { - return; - } - - nodeName = dest.nodeName.toLowerCase(); - - // IE6-8 copies events bound via attachEvent when using cloneNode. - if ( !jQuery.support.noCloneEvent && dest[ jQuery.expando ] ) { - data = jQuery._data( dest ); - - for ( e in data.events ) { - jQuery.removeEvent( dest, e, data.handle ); - } - - // Event data gets referenced instead of copied if the expando gets copied too - dest.removeAttribute( jQuery.expando ); - } - - // IE blanks contents when cloning scripts, and tries to evaluate newly-set text - if ( nodeName === "script" && dest.text !== src.text ) { - disableScript( dest ).text = src.text; - restoreScript( dest ); - - // IE6-10 improperly clones children of object elements using classid. - // IE10 throws NoModificationAllowedError if parent is null, #12132. - } else if ( nodeName === "object" ) { - if ( dest.parentNode ) { - dest.outerHTML = src.outerHTML; - } - - // This path appears unavoidable for IE9. When cloning an object - // element in IE9, the outerHTML strategy above is not sufficient. - // If the src has innerHTML and the destination does not, - // copy the src.innerHTML into the dest.innerHTML. #10324 - if ( jQuery.support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) { - dest.innerHTML = src.innerHTML; - } - - } else if ( nodeName === "input" && manipulation_rcheckableType.test( src.type ) ) { - // IE6-8 fails to persist the checked state of a cloned checkbox - // or radio button. Worse, IE6-7 fail to give the cloned element - // a checked appearance if the defaultChecked value isn't also set - - dest.defaultChecked = dest.checked = src.checked; - - // IE6-7 get confused and end up setting the value of a cloned - // checkbox/radio button to an empty string instead of "on" - if ( dest.value !== src.value ) { - dest.value = src.value; - } - - // IE6-8 fails to return the selected option to the default selected - // state when cloning options - } else if ( nodeName === "option" ) { - dest.defaultSelected = dest.selected = src.defaultSelected; - - // IE6-8 fails to set the defaultValue to the correct value when - // cloning other types of input fields - } else if ( nodeName === "input" || nodeName === "textarea" ) { - dest.defaultValue = src.defaultValue; - } -} - -jQuery.each({ - appendTo: "append", - prependTo: "prepend", - insertBefore: "before", - insertAfter: "after", - replaceAll: "replaceWith" -}, function( name, original ) { - jQuery.fn[ name ] = function( selector ) { - var elems, - i = 0, - ret = [], - insert = jQuery( selector ), - last = insert.length - 1; - - for ( ; i <= last; i++ ) { - elems = i === last ? this : this.clone(true); - jQuery( insert[i] )[ original ]( elems ); - - // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get() - core_push.apply( ret, elems.get() ); - } - - return this.pushStack( ret ); - }; -}); - -function getAll( context, tag ) { - var elems, elem, - i = 0, - found = typeof context.getElementsByTagName !== core_strundefined ? context.getElementsByTagName( tag || "*" ) : - typeof context.querySelectorAll !== core_strundefined ? context.querySelectorAll( tag || "*" ) : - undefined; - - if ( !found ) { - for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) { - if ( !tag || jQuery.nodeName( elem, tag ) ) { - found.push( elem ); - } else { - jQuery.merge( found, getAll( elem, tag ) ); - } - } - } - - return tag === undefined || tag && jQuery.nodeName( context, tag ) ? - jQuery.merge( [ context ], found ) : - found; -} - -// Used in buildFragment, fixes the defaultChecked property -function fixDefaultChecked( elem ) { - if ( manipulation_rcheckableType.test( elem.type ) ) { - elem.defaultChecked = elem.checked; - } -} - -jQuery.extend({ - clone: function( elem, dataAndEvents, deepDataAndEvents ) { - var destElements, node, clone, i, srcElements, - inPage = jQuery.contains( elem.ownerDocument, elem ); - - if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { - clone = elem.cloneNode( true ); - - // IE<=8 does not properly clone detached, unknown element nodes - } else { - fragmentDiv.innerHTML = elem.outerHTML; - fragmentDiv.removeChild( clone = fragmentDiv.firstChild ); - } - - if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) && - (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { - - // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 - destElements = getAll( clone ); - srcElements = getAll( elem ); - - // Fix all IE cloning issues - for ( i = 0; (node = srcElements[i]) != null; ++i ) { - // Ensure that the destination node is not null; Fixes #9587 - if ( destElements[i] ) { - fixCloneNodeIssues( node, destElements[i] ); - } - } - } - - // Copy the events from the original to the clone - if ( dataAndEvents ) { - if ( deepDataAndEvents ) { - srcElements = srcElements || getAll( elem ); - destElements = destElements || getAll( clone ); - - for ( i = 0; (node = srcElements[i]) != null; i++ ) { - cloneCopyEvent( node, destElements[i] ); - } - } else { - cloneCopyEvent( elem, clone ); - } - } - - // Preserve script evaluation history - destElements = getAll( clone, "script" ); - if ( destElements.length > 0 ) { - setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); - } - - destElements = srcElements = node = null; - - // Return the cloned set - return clone; - }, - - buildFragment: function( elems, context, scripts, selection ) { - var j, elem, contains, - tmp, tag, tbody, wrap, - l = elems.length, - - // Ensure a safe fragment - safe = createSafeFragment( context ), - - nodes = [], - i = 0; - - for ( ; i < l; i++ ) { - elem = elems[ i ]; - - if ( elem || elem === 0 ) { - - // Add nodes directly - if ( jQuery.type( elem ) === "object" ) { - jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); - - // Convert non-html into a text node - } else if ( !rhtml.test( elem ) ) { - nodes.push( context.createTextNode( elem ) ); - - // Convert html into DOM nodes - } else { - tmp = tmp || safe.appendChild( context.createElement("div") ); - - // Deserialize a standard representation - tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(); - wrap = wrapMap[ tag ] || wrapMap._default; - - tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1>" ) + wrap[2]; - - // Descend through wrappers to the right content - j = wrap[0]; - while ( j-- ) { - tmp = tmp.lastChild; - } - - // Manually add leading whitespace removed by IE - if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { - nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) ); - } - - // Remove IE's autoinserted from table fragments - if ( !jQuery.support.tbody ) { - - // String was a , *may* have spurious - elem = tag === "table" && !rtbody.test( elem ) ? - tmp.firstChild : - - // String was a bare or - wrap[1] === "
    " && !rtbody.test( elem ) ? - tmp : - 0; - - j = elem && elem.childNodes.length; - while ( j-- ) { - if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) { - elem.removeChild( tbody ); - } - } - } - - jQuery.merge( nodes, tmp.childNodes ); - - // Fix #12392 for WebKit and IE > 9 - tmp.textContent = ""; - - // Fix #12392 for oldIE - while ( tmp.firstChild ) { - tmp.removeChild( tmp.firstChild ); - } - - // Remember the top-level container for proper cleanup - tmp = safe.lastChild; - } - } - } - - // Fix #11356: Clear elements from fragment - if ( tmp ) { - safe.removeChild( tmp ); - } - - // Reset defaultChecked for any radios and checkboxes - // about to be appended to the DOM in IE 6/7 (#8060) - if ( !jQuery.support.appendChecked ) { - jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked ); - } - - i = 0; - while ( (elem = nodes[ i++ ]) ) { - - // #4087 - If origin and destination elements are the same, and this is - // that element, do not do anything - if ( selection && jQuery.inArray( elem, selection ) !== -1 ) { - continue; - } - - contains = jQuery.contains( elem.ownerDocument, elem ); - - // Append to fragment - tmp = getAll( safe.appendChild( elem ), "script" ); - - // Preserve script evaluation history - if ( contains ) { - setGlobalEval( tmp ); - } - - // Capture executables - if ( scripts ) { - j = 0; - while ( (elem = tmp[ j++ ]) ) { - if ( rscriptType.test( elem.type || "" ) ) { - scripts.push( elem ); - } - } - } - } - - tmp = null; - - return safe; - }, - - cleanData: function( elems, /* internal */ acceptData ) { - var elem, type, id, data, - i = 0, - internalKey = jQuery.expando, - cache = jQuery.cache, - deleteExpando = jQuery.support.deleteExpando, - special = jQuery.event.special; - - for ( ; (elem = elems[i]) != null; i++ ) { - - if ( acceptData || jQuery.acceptData( elem ) ) { - - id = elem[ internalKey ]; - data = id && cache[ id ]; - - if ( data ) { - if ( data.events ) { - for ( type in data.events ) { - if ( special[ type ] ) { - jQuery.event.remove( elem, type ); - - // This is a shortcut to avoid jQuery.event.remove's overhead - } else { - jQuery.removeEvent( elem, type, data.handle ); - } - } - } - - // Remove cache only if it was not already removed by jQuery.event.remove - if ( cache[ id ] ) { - - delete cache[ id ]; - - // IE does not allow us to delete expando properties from nodes, - // nor does it have a removeAttribute function on Document nodes; - // we must handle all of these cases - if ( deleteExpando ) { - delete elem[ internalKey ]; - - } else if ( typeof elem.removeAttribute !== core_strundefined ) { - elem.removeAttribute( internalKey ); - - } else { - elem[ internalKey ] = null; - } - - core_deletedIds.push( id ); - } - } - } - } - }, - - _evalUrl: function( url ) { - return jQuery.ajax({ - url: url, - type: "GET", - dataType: "script", - async: false, - global: false, - "throws": true - }); - } -}); -jQuery.fn.extend({ - wrapAll: function( html ) { - if ( jQuery.isFunction( html ) ) { - return this.each(function(i) { - jQuery(this).wrapAll( html.call(this, i) ); - }); - } - - if ( this[0] ) { - // The elements to wrap the target around - var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true); - - if ( this[0].parentNode ) { - wrap.insertBefore( this[0] ); - } - - wrap.map(function() { - var elem = this; - - while ( elem.firstChild && elem.firstChild.nodeType === 1 ) { - elem = elem.firstChild; - } - - return elem; - }).append( this ); - } - - return this; - }, - - wrapInner: function( html ) { - if ( jQuery.isFunction( html ) ) { - return this.each(function(i) { - jQuery(this).wrapInner( html.call(this, i) ); - }); - } - - return this.each(function() { - var self = jQuery( this ), - contents = self.contents(); - - if ( contents.length ) { - contents.wrapAll( html ); - - } else { - self.append( html ); - } - }); - }, - - wrap: function( html ) { - var isFunction = jQuery.isFunction( html ); - - return this.each(function(i) { - jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html ); - }); - }, - - unwrap: function() { - return this.parent().each(function() { - if ( !jQuery.nodeName( this, "body" ) ) { - jQuery( this ).replaceWith( this.childNodes ); - } - }).end(); - } -}); -var iframe, getStyles, curCSS, - ralpha = /alpha\([^)]*\)/i, - ropacity = /opacity\s*=\s*([^)]*)/, - rposition = /^(top|right|bottom|left)$/, - // swappable if display is none or starts with table except "table", "table-cell", or "table-caption" - // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display - rdisplayswap = /^(none|table(?!-c[ea]).+)/, - rmargin = /^margin/, - rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ), - rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ), - rrelNum = new RegExp( "^([+-])=(" + core_pnum + ")", "i" ), - elemdisplay = { BODY: "block" }, - - cssShow = { position: "absolute", visibility: "hidden", display: "block" }, - cssNormalTransform = { - letterSpacing: 0, - fontWeight: 400 - }, - - cssExpand = [ "Top", "Right", "Bottom", "Left" ], - cssPrefixes = [ "Webkit", "O", "Moz", "ms" ]; - -// return a css property mapped to a potentially vendor prefixed property -function vendorPropName( style, name ) { - - // shortcut for names that are not vendor prefixed - if ( name in style ) { - return name; - } - - // check for vendor prefixed names - var capName = name.charAt(0).toUpperCase() + name.slice(1), - origName = name, - i = cssPrefixes.length; - - while ( i-- ) { - name = cssPrefixes[ i ] + capName; - if ( name in style ) { - return name; - } - } - - return origName; -} - -function isHidden( elem, el ) { - // isHidden might be called from jQuery#filter function; - // in that case, element will be second argument - elem = el || elem; - return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); -} - -function showHide( elements, show ) { - var display, elem, hidden, - values = [], - index = 0, - length = elements.length; - - for ( ; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - - values[ index ] = jQuery._data( elem, "olddisplay" ); - display = elem.style.display; - if ( show ) { - // Reset the inline display of this element to learn if it is - // being hidden by cascaded rules or not - if ( !values[ index ] && display === "none" ) { - elem.style.display = ""; - } - - // Set elements which have been overridden with display: none - // in a stylesheet to whatever the default browser style is - // for such an element - if ( elem.style.display === "" && isHidden( elem ) ) { - values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) ); - } - } else { - - if ( !values[ index ] ) { - hidden = isHidden( elem ); - - if ( display && display !== "none" || !hidden ) { - jQuery._data( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) ); - } - } - } - } - - // Set the display of most of the elements in a second loop - // to avoid the constant reflow - for ( index = 0; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - if ( !show || elem.style.display === "none" || elem.style.display === "" ) { - elem.style.display = show ? values[ index ] || "" : "none"; - } - } - - return elements; -} - -jQuery.fn.extend({ - css: function( name, value ) { - return jQuery.access( this, function( elem, name, value ) { - var len, styles, - map = {}, - i = 0; - - if ( jQuery.isArray( name ) ) { - styles = getStyles( elem ); - len = name.length; - - for ( ; i < len; i++ ) { - map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); - } - - return map; - } - - return value !== undefined ? - jQuery.style( elem, name, value ) : - jQuery.css( elem, name ); - }, name, value, arguments.length > 1 ); - }, - show: function() { - return showHide( this, true ); - }, - hide: function() { - return showHide( this ); - }, - toggle: function( state ) { - if ( typeof state === "boolean" ) { - return state ? this.show() : this.hide(); - } - - return this.each(function() { - if ( isHidden( this ) ) { - jQuery( this ).show(); - } else { - jQuery( this ).hide(); - } - }); - } -}); - -jQuery.extend({ - // Add in style property hooks for overriding the default - // behavior of getting and setting a style property - cssHooks: { - opacity: { - get: function( elem, computed ) { - if ( computed ) { - // We should always get a number back from opacity - var ret = curCSS( elem, "opacity" ); - return ret === "" ? "1" : ret; - } - } - } - }, - - // Don't automatically add "px" to these possibly-unitless properties - cssNumber: { - "columnCount": true, - "fillOpacity": true, - "fontWeight": true, - "lineHeight": true, - "opacity": true, - "order": true, - "orphans": true, - "widows": true, - "zIndex": true, - "zoom": true - }, - - // Add in properties whose names you wish to fix before - // setting or getting the value - cssProps: { - // normalize float css property - "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat" - }, - - // Get and set the style property on a DOM Node - style: function( elem, name, value, extra ) { - // Don't set styles on text and comment nodes - if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { - return; - } - - // Make sure that we're working with the right name - var ret, type, hooks, - origName = jQuery.camelCase( name ), - style = elem.style; - - name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) ); - - // gets hook for the prefixed version - // followed by the unprefixed version - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // Check if we're setting a value - if ( value !== undefined ) { - type = typeof value; - - // convert relative number strings (+= or -=) to relative numbers. #7345 - if ( type === "string" && (ret = rrelNum.exec( value )) ) { - value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) ); - // Fixes bug #9237 - type = "number"; - } - - // Make sure that NaN and null values aren't set. See: #7116 - if ( value == null || type === "number" && isNaN( value ) ) { - return; - } - - // If a number was passed in, add 'px' to the (except for certain CSS properties) - if ( type === "number" && !jQuery.cssNumber[ origName ] ) { - value += "px"; - } - - // Fixes #8908, it can be done more correctly by specifing setters in cssHooks, - // but it would mean to define eight (for every problematic property) identical functions - if ( !jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) { - style[ name ] = "inherit"; - } - - // If a hook was provided, use that value, otherwise just set the specified value - if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) { - - // Wrapped to prevent IE from throwing errors when 'invalid' values are provided - // Fixes bug #5509 - try { - style[ name ] = value; - } catch(e) {} - } - - } else { - // If a hook was provided get the non-computed value from there - if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) { - return ret; - } - - // Otherwise just get the value from the style object - return style[ name ]; - } - }, - - css: function( elem, name, extra, styles ) { - var num, val, hooks, - origName = jQuery.camelCase( name ); - - // Make sure that we're working with the right name - name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) ); - - // gets hook for the prefixed version - // followed by the unprefixed version - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // If a hook was provided get the computed value from there - if ( hooks && "get" in hooks ) { - val = hooks.get( elem, true, extra ); - } - - // Otherwise, if a way to get the computed value exists, use that - if ( val === undefined ) { - val = curCSS( elem, name, styles ); - } - - //convert "normal" to computed value - if ( val === "normal" && name in cssNormalTransform ) { - val = cssNormalTransform[ name ]; - } - - // Return, converting to number if forced or a qualifier was provided and val looks numeric - if ( extra === "" || extra ) { - num = parseFloat( val ); - return extra === true || jQuery.isNumeric( num ) ? num || 0 : val; - } - return val; - } -}); - -// NOTE: we've included the "window" in window.getComputedStyle -// because jsdom on node.js will break without it. -if ( window.getComputedStyle ) { - getStyles = function( elem ) { - return window.getComputedStyle( elem, null ); - }; - - curCSS = function( elem, name, _computed ) { - var width, minWidth, maxWidth, - computed = _computed || getStyles( elem ), - - // getPropertyValue is only needed for .css('filter') in IE9, see #12537 - ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined, - style = elem.style; - - if ( computed ) { - - if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { - ret = jQuery.style( elem, name ); - } - - // A tribute to the "awesome hack by Dean Edwards" - // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right - // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels - // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values - if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { - - // Remember the original values - width = style.width; - minWidth = style.minWidth; - maxWidth = style.maxWidth; - - // Put in the new values to get a computed value out - style.minWidth = style.maxWidth = style.width = ret; - ret = computed.width; - - // Revert the changed values - style.width = width; - style.minWidth = minWidth; - style.maxWidth = maxWidth; - } - } - - return ret; - }; -} else if ( document.documentElement.currentStyle ) { - getStyles = function( elem ) { - return elem.currentStyle; - }; - - curCSS = function( elem, name, _computed ) { - var left, rs, rsLeft, - computed = _computed || getStyles( elem ), - ret = computed ? computed[ name ] : undefined, - style = elem.style; - - // Avoid setting ret to empty string here - // so we don't default to auto - if ( ret == null && style && style[ name ] ) { - ret = style[ name ]; - } - - // 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 - // but not position css attributes, as those are proportional to the parent element instead - // and we can't measure the parent instead because it might trigger a "stacking dolls" problem - if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) { - - // Remember the original values - left = style.left; - rs = elem.runtimeStyle; - rsLeft = rs && rs.left; - - // Put in the new values to get a computed value out - if ( rsLeft ) { - rs.left = elem.currentStyle.left; - } - style.left = name === "fontSize" ? "1em" : ret; - ret = style.pixelLeft + "px"; - - // Revert the changed values - style.left = left; - if ( rsLeft ) { - rs.left = rsLeft; - } - } - - return ret === "" ? "auto" : ret; - }; -} - -function setPositiveNumber( elem, value, subtract ) { - var matches = rnumsplit.exec( value ); - return matches ? - // Guard against undefined "subtract", e.g., when used as in cssHooks - Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) : - value; -} - -function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { - var i = extra === ( isBorderBox ? "border" : "content" ) ? - // If we already have the right measurement, avoid augmentation - 4 : - // Otherwise initialize for horizontal or vertical properties - name === "width" ? 1 : 0, - - val = 0; - - for ( ; i < 4; i += 2 ) { - // both box models exclude margin, so add it if we want it - if ( extra === "margin" ) { - val += jQuery.css( elem, extra + cssExpand[ i ], true, styles ); - } - - if ( isBorderBox ) { - // border-box includes padding, so remove it if we want content - if ( extra === "content" ) { - val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - } - - // at this point, extra isn't border nor margin, so remove border - if ( extra !== "margin" ) { - val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - } - } else { - // at this point, extra isn't content, so add padding - val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - - // at this point, extra isn't content nor padding, so add border - if ( extra !== "padding" ) { - val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - } - } - } - - return val; -} - -function getWidthOrHeight( elem, name, extra ) { - - // Start with offset property, which is equivalent to the border-box value - var valueIsBorderBox = true, - val = name === "width" ? elem.offsetWidth : elem.offsetHeight, - styles = getStyles( elem ), - isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; - - // some non-html elements return undefined for offsetWidth, so check for null/undefined - // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285 - // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668 - if ( val <= 0 || val == null ) { - // Fall back to computed then uncomputed css if necessary - val = curCSS( elem, name, styles ); - if ( val < 0 || val == null ) { - val = elem.style[ name ]; - } - - // Computed unit is not pixels. Stop here and return. - if ( rnumnonpx.test(val) ) { - return val; - } - - // we need the check for style in case a browser which returns unreliable values - // for getComputedStyle silently falls back to the reliable elem.style - valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] ); - - // Normalize "", auto, and prepare for extra - val = parseFloat( val ) || 0; - } - - // use the active box-sizing model to add/subtract irrelevant styles - return ( val + - augmentWidthOrHeight( - elem, - name, - extra || ( isBorderBox ? "border" : "content" ), - valueIsBorderBox, - styles - ) - ) + "px"; -} - -// Try to determine the default display value of an element -function css_defaultDisplay( nodeName ) { - var doc = document, - display = elemdisplay[ nodeName ]; - - if ( !display ) { - display = actualDisplay( nodeName, doc ); - - // If the simple way fails, read from inside an iframe - if ( display === "none" || !display ) { - // Use the already-created iframe if possible - iframe = ( iframe || - jQuery("